Topic: APLX Help : System Classes : Properties : selection
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

The 'selection' property


A two-element integer vector, or four-element integer vector for a Grid

Valid for: Edit, RichEdit, Document, Combo (except under MacOS), Grid

For an Edit, RichEdit, Combo or Document object, the selection property determines the position of the insertion point and the length of the selected (highlighted) text. The first element is the position of the insertion point (or start of the selected text) in index origin 0. The second is the length of the selection, or 0 if there is none. Setting the selection length to ¯1 selects from the start position to the end of the text.

You can set this property under program control, or it can be changed by the user (you can detect that this has happened by means of the onClick callback).

For a Grid object, the selection property is a four-element integer vector, comprising the Row and Column of the top-left of the selected cell range, followed by the number of rows selected and the number of columns selected. If the style property is set so that only single-selection is possible (which is the default), the last two elements will both be one. You can write to this property to change the selection under program control.


Topic: APLX Help : System Classes : Properties : selection
[ Previous | Next | Contents | Index | APL Home ]