4D v14.3

LISTBOX SET HIERARCHY

Home

 
4D v14.3
LISTBOX SET HIERARCHY

LISTBOX SET HIERARCHY 


 

LISTBOX SET HIERARCHY ( {* ;} object ; hierarchical {; hierarchy} )  
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)
hierarchical  Boolean in True = hierarchical list box False = non-hierarchical list box
hierarchy  Pointer array in Array of pointers

The LISTBOX SET HIERARCHY command lets you configure the list box object designated by the object and * parameters in hierarchical or non-hierarchical mode. 

Note: This command only functions with list boxes based on arrays. When this command is used with a list box based on selections, it does nothing.

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. 

The Boolean hierarchical parameter lets you specify the list box mode:

  • if you pass True, the list box is displayed in hierarchical mode,
  • if you pass False, the list box is displayed in non-hierarchical mode (standard array mode).

When you pass a list box in hierarchical mode, certain properties are automatically restricted. For more information, please refer to the Managing Hierarchical List Boxes section. 

The hierarchy parameter is used to designate the arrays of the list box to be used to construct the hierarchy (see example). If you display the list box in hierarchical mode and omit this parameter:

  • if the list box is already in hierarchical mode, the command does nothing.
  • if the list box is in non-hierarchical mode and has never been declared hierarchical, the first array is used as the hierarchy by default.
  • if the list box is in non-hierarchical mode but has previously been declared hierarchical, the last hierarchy is re-established.

Example  

Definition of the aCountry, aRegion and aCity arrays as the hierarchy of a list box:

 ARRAY POINTER($ArrHierarch;3)
 $ArrHierarch{1}:=->aCountry `First break level
 $ArrHierarch{2}:=->aRegion `Second break level
 $ArrHierarch{3}:=->aCity `Third break level
 LISTBOX SET HIERARCHY(*;"mylistbox";True;$ArrHierarch)

 
PROPERTIES 

Product: 4D
Theme: List Box
Number: 1098

 
HISTORY 

Created: 4D v12

 
SEE ALSO 

LISTBOX GET HIERARCHY
Managing Hierarchical List Boxes

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)