Skip to main content
Version: Next

LISTBOX Get auto row height

LISTBOX Get auto row height ( {* ;} object ; selector {; unit} ) -> Function result

ParameterTypeDescription
*Operator🡒If specified, object is an object name (string). If omitted, object is a variable.
objectForm object🡒Object name (if * is specified) or Variable (if * is omitted)
selectorLongint🡒Height value to get: lk row min height or lk row max height
unitLongint🡒Unit of height value: 0 = pixels, 1 = lines
Function resultLongint🡐Selected row height value

Description

The LISTBOX Get auto row height command returns the current minimum or maximum row height value set for the list box object designated using the object and * parameters.

The current minimum or maximum row height value can be set either in the Property list (see Automatic Row Height) or in the current process using the LISTBOX SET AUTO ROW HEIGHT command.

Note: This command can be used with "collection or entity selection" and "array" list boxes only.

If you pass the optional * parameter, you indicate that the object parameter is an object name (string). If you do not pass this parameter, you indicate that the object parameter is a variable. In this case, you pass a variable reference instead of a string. For more information about object names, refer to the Object Properties section.

In selector, pass the type of value to get. You can use one of the following constants from the List Box theme:

ConstantTypeValue
lk row max heightLongint33
lk row min heightLongint32

By default, the command returns the value in pixels. You can pass one of the following constants from the List Box theme in the unit parameter to define the unit to use:

ConstantTypeValueComment
lk linesLongint1Height is expressed as a number of lines. 4D calculates the height of a line according to the font.
lk pixelsLongint0Height is expressed as a number of pixels (default).

Example

You want to get the maximum number of lines for a list box row:

 var vhMaxInteger
 vhMax:=LISTBOX Get auto row height(*;"LB";lk row max height;lk lines)

See also

LISTBOX Get row height
LISTBOX Get rows height
LISTBOX SET AUTO ROW HEIGHT