Skip to content

DoCollapseAll - TreeView

Programmatically collapses an item and all its children

Type: Procedure

Parameters

Parameter Type Description
hItem Handle Item handle

Syntax

Procedure DoCollapseAll Handle hItem

Call Example

Send DoCollapseAll hItem

Description

You can call DoCollapseAll to programmatically collapse an item and all its children.

If you want to collapse the whole tree, pass zero as hItem.

Sample

This sample shows how to collapse a specific item and all its children in TreeView oTreeView1

Procedure MyCustomMethod Handle hItem
    Send DoCollapseAll of oTreeView1 hItem
End_Procedure

Sample

This sample shows how to collapse all items in TreeView oTreeView1

Send DoCollapseAll of oTreeView1 0