Selection

Selection Count 

Returns the number of non-contiguous selections in the document. Returns 1 if there is a single selection or a zero length selection (the caret). NOTE: if more than one text storage is selected (eg: multiple table cells) then this count only includes selections in the text storage containing the first selection.

Selected Storage Length

Returns the total number of characters in the text storage (eg: document body, header, table cell, etc) that contains the first selection.

Selected Table Row Count 

Returns the total number of rows in the first selected table, or zero if no table is selected.

Selected Table Column Count 

Returns the total number of columns in the first selected table, or zero if no table is selected.

Selection Location [selectionIndex]

Returns the index (1-based) of the first character in the selection. If the selection is zero characters in length then this returns the index of the character that follows the caret. This command optionally takes a (1-based) index that specifies which selection’s location to return (eg: the 2nd selection in the document). 

Selection Length [selectionIndex]

Returns the number of characters in the selection. Optionally takes a (1- based) index that specifies which selection's length to return.

Selection Row Index

Returns the (1-based) index of the first table row in the selection, or zero if no table is selected.

Selection Column Index

Returns the (1-based) index of the first table column in the selection, or zero if no table is selected.

Selection Row Count

Returns the number of table rows selected by the first table selection. This number is the total number of rows the selection intersects, eg: if the caret rests in a table cell that spans two table rows this command will return 2. If no table selection exists, this command returns zero.

Selection Column Count

Returns the total number of table columns intersected by the first table selection (see details on this count under the command Selection Row Count).

Set Selection Location index

Sets the (1-based) index of the first character that should be contained in the selection. If the index is out of bounds, displays an error. Does not alter the length of the selection unless the new location would place the endpoint of the selection out of bounds, in which case the selection is clipped to be legal. 

Set Selection Length count

Sets the number of characters contained in the selection. Does not change the location of the selection. Displays an error if the new length would cause the selection to be out of bounds.

Set Selection location, length

Takes two arguments, the location of the first character in the selection and the number of characters to include. This displays an error if any part of the requested selection is out of bounds.

Select Table Cell row, column

Selects the table cell with the given coordinates (1-based). If the selection currently rests inside a table, then the cell is selected in that table. If no table is currently selected then selects the cell in the first table after the selection.

Select Relative Table Cell moveRows, moveCols

Takes two arguments, the number of rows to move forward by and the number of columns. You may specify negative numbers to move backwards. Returns @true if the move is legal (a valid cell exists), otherwise returns @false and leaves the selection unchanged.


Previous Chapter
Menus
<<  index  >>
 
Next Chapter
Application Properties