Skip to main content
Version: Next

LISTBOX SET HIERARCHY

LISTBOX SET HIERARCHY ( {* ;} object ; hierarchical {; hierarchy} )

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)
hierarchicalBoolean🡒True = hierarchical list box
False = non-hierarchical list box
hierarchyPointer array🡒Array of pointers

Description

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)

See also

LISTBOX GET HIERARCHY