LISTBOX COLLAPSE
LISTBOX COLLAPSE ( {* ;} object {; recursive {; selector {; line {; column}}}} )
Parameter | Type | Description | |
---|---|---|---|
* | Operator | → | If specified, object is an object name (string) If omitted, object is a variable |
object | any | → | Object name (if * is specified) or Variable (if * is omitted) |
recursive | Boolean | → | True = collapse sublevels False = do not collapse sublevels |
selector | Integer | → | Part of list box to collapse |
line | Integer | → | Number of break row to collapse or Number of list box level to collapse |
column | Integer | → | Number of break column to collapse |
This command is not thread-safe, it cannot be used in preemptive code.
Description
The LISTBOX COLLAPSE command is used to collapse the break rows of the list box object designated by the object and * parameters.
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.
If the list box is not configured in hierarchical mode, the command does nothing. For more information about hierarchical list boxes, please refer to the Hierarchical list boxes section.
The optional recursive parameter is used to configure the collapsing of the hierarchical sublevels of the list box. Pass True or omit this parameter for the command to collapse all the levels and all the sublevels. If you pass False, only the first level will be collapsed.
The optional selector parameter is used to specify the scope of the command. You can pass one of the following constants, found in the List Box theme, in this parameter:
Constant | Type | Value | Comment |
---|---|---|---|
lk all | Integer | 0 | The command affects all sub-levels (default value, used when parameter is omitted). |
lk selection | Integer | 1 | The command affects selected sub-levels. |
lk break row | Integer | 2 | The command affects the sub-level to which the "cell" designated by the row and column parameters belongs. Note that these parameters represent the row and column numbers in the list box in standard mode and not in its hierarchical representation. If the row and column parameters are omitted, the command does nothing. |
lk level | Integer | 3 | The command affects all the break rows corresponding to the level column. This parameter designates a column number in the list box in standard mode and not in its hierarchical representation. If the level parameter is omitted, the command does nothing. |
If the selection or list box does not contain a break row or if all the break rows are already collapsed, the command does nothing.
Example
This example collapses the first level of the break rows of the selection in the list box:
LISTBOX COLLAPSE(*;"MyListbox";False;lk selection)