4D v16.3

LISTBOX GET CELL POSITION

Home

 
4D v16.3
LISTBOX GET CELL POSITION

LISTBOX GET CELL POSITION 


 

LISTBOX GET CELL POSITION ( {* ;} object ; column ; row {; colVar} ) 
Parameter Type   Description
Operator in If specified, object is an object name (string) If omitted, object is a variable
object  Form object in Object name (if * is specified) or Variable (if * is omitted)
column  Longint in Column number
row  Longint in Row number
colVar  Pointer in Pointer to column variable

The LISTBOX GET 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.

Notes:

  • The number returned in the row parameter does not take into account any hidden/displayed states of list box rows.
  • If a cell in a fake column is clicked, the row parameter contains "X+1", where X is the number of existing columns. (A fake column can be added automatically when the "Column Auto-Resizing" option is selected; for more information refer to the Resizing Options theme paragraph).

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, LISTBOX GET 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.



See also 

LISTBOX GET CELL COORDINATES
LISTBOX SELECT BREAK

 
PROPERTIES 

Product: 4D
Theme: List Box
Number: 971

 
HISTORY 

Modified: 4D v11 SQL Release 2
Renamed: 4D v12

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)