This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
LISTBOX SET AUTO ROW HEIGHT

LISTBOX SET AUTO ROW HEIGHT 


 

LISTBOX SET AUTO ROW HEIGHT ( {* ;} object ; selector ; value ; unit ) 
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)
selector  Longint in Height value to set: lk row min height or lk row max height
value  Longint in Minimum or maximum row height value
unit  Longint in Unit of height value: 0 = pixels, 1 = lines

The LISTBOX SET AUTO ROW HEIGHT command allows you to set the minimum or maximum row height value in the list box object designated using the object and * parameters.

Note: This command is taken into account only if the list box is set to automatic row height mode (see Automatic Row Height), which is only available for "collection or entity selection" and "array" list boxes. Otherwise, it has no effect.

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 set. You can use one of the following constants from the List Box theme:

Constant Type Value
lk row max height Longint 33
lk row min height Longint 32

In value, pass the corresponding value in the appropriate unit.

The unit parameter can be set using one of the following constants from the List Box theme:

Constant Type Value Comment
lk lines Longint 1 Height is expressed as a number of lines. 4D calculates the height of a line according to the font.
lk pixels Longint 0 Height is expressed as a number of pixels (default).

Note: The command does not check the consistency of the values. However, at runtime, the minimum value will be applied to both values in case of conflict. For example, if the minimum value is 5 lines and the maximum value is 3 lines (which is inconsistent), the maximum height applied to the list box rows will be 5 lines.

Example  

You want to set the minimum and maximum heights for a list box with an automatic row height:

 LISTBOX SET AUTO ROW HEIGHT(*;"LB";lk row min height;60;lk pixels// 60 pixels for min value
 LISTBOX SET AUTO ROW HEIGHT(*;"LB";lk row max height;100;lk pixels//and 100 pixels for max value



See also 

LISTBOX Get auto row height
LISTBOX SET ROW HEIGHT
LISTBOX SET ROWS HEIGHT

 
PROPERTIES 

Product: 4D
Theme: List Box
Number: 1501

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v16 R5
Modified: 4D v19 R8

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)