Promotic
Login logon

SetExpanded - method of the PmfTreeItem object

Description:
Expands or collapses the tree item.
Syntax:
Empty SetExpanded(Long nType, [Long nLevel])
Parameters:
nType(Long) Specifies whether the item will be collapsed or expanded.
0 - Collapses the tree item, i.e. the subitems will not be visible.
The onExpand event is triggered after collapsing.
1 - Expands the tree item, i.e. the subitems will be visible.
The onExpand event is triggered after collapsing. For dynamic items (see RequestType) the onItemRequest event is triggered.
nLevel[optional] (Long) Specifies the level to which the item will be collapsed/expanded.
0 (default) - Expands/collapses only the corresponding item.
1 - Expands/collapses all direct subitems of the specified item.
-1 - Expands all subitems of the specified item down to the last level. (only if the nType parameter is set to 1).
Note:
This method is also functional in Web panels.
See also:
Example:
JavaScriptSelect and copy to clipboard

oTreeItem1.SetExpanded(0);   // Collapses the item
oTreeItem1.SetExpanded(1);   // Expands the item
oTreeItem1.SetExpanded(1, -1);   // Expands all subitems down to the last level.

History:
Pm9.00.26: Created
PROMOTIC 9.0.34 SCADA system documentation MICROSYS, spol. s r.o.

Send page remark Contact responsible person
© MICROSYS, spol. s r.o.Update cookies preferences