4D v16.3LISTBOX GET CELL COORDINATES |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
LISTBOX GET CELL COORDINATES
LISTBOX GET CELL COORDINATES
The LISTBOX GET CELL COORDINATES command returns in variables or fields the left, top, right and bottom coordinates (in points) of the cell designated by the column and row parameters, in the list box defined by * and object. If you pass the optional * parameter, it indicates that the object parameter is an object name (a string). If you don’t pass the optional * parameter, this indicates that the object is a field or a variable. In this case, you pass a field or variable reference (only a field or variable of the object type) instead of a string For consistency with the OBJECT GET COORDINATES command, the origin is the upper-left corner of the form which contains the cell. Also, the coordinates returned are theoretical; they take into account the scrolling state of the list box before any clipping occurs. As a result, the cell may be not visible (or only partially so) at its coordinates, and these coordinates may be outside the form limits (or even negative). To find out if the cell is displayed (and which part of it is visible) you need to compare the coordinates returned with the list box coordinates, while considering the following rules:
For more information, please refer to the OBJECT GET COORDINATES command description. You want to draw a red rectangle around the selected cell of a list box: OBJECT SET VISIBLE(*;"RedRect";False) //initialize a red rectangle
See also
|
PROPERTIES
Product: 4D
HISTORY
Created: 4D v14 R5 ARTICLE USAGE
4D Language Reference ( 4D v16) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||