version 2004.5
GET LISTBOX CELL POSITION ({*; }object; column; row{; colVar})
Parameter | Type | Description | |
* | If specified, object is an object name (string) | ||
If omitted, object is a variable | |||
object | Form object | Object name (if * is specified) or | |
Variable (if * is omitted) | |||
column | Longint | Column number | |
row | Longint | Row number | |
colVar | Pointer | Pointer to column variable |
Description
The GET LISTBOX CELL POSITION command returns the numbers of the column and the row that correspond to the location of the last mouse click or the last selection made via the keyboard in the listbox designated by * and object.
This command returns the coordinates of a click or a selection action even when data entry is not allowed in the list box.
If you pass the optional * parameter, you indicate that the object parameter is an object name (a string). If you omit this parameter, you indicate that the object parameter is a variable.
The optional colVar parameter returns a pointer to the variable (i.e. array) associated with the column.
This command can only be called in the framework of a list box that generates one of the following form events:
On Clicked and On Double Clicked
On Before Keystroke and On After Keystroke
On After Edit
On Getting Focus and On Losing Focus
On Data Change
On Selection Change
On Before Data Entry
When the command is called outside of this context, GET LISTBOX CELL POSITION returns 0 in both column and row.
This command takes into account any selection or deselection actions whether by mouse click, via keyboard keys, or using the EDIT ITEM command (which can generate the On Getting Focus event).
If the selection is modified using the arrow keys of the keyboard, column returns 0. In this case, if it is passed, the colVar parameter returns Nil.
The values returned by the command are not updated in the case of a right mouse click (or Control+click under Mac OS) on the header of a list box column..