Skip to content

OnItemExpanding - AbstractTreeView

Fired whenever an item is about to be opened

Type: Event

Parameters

Parameter Type Description
hItem Handle The handle of the item that is about to be opened
ByRef bCancel Boolean Can be used to cancel the event by returning True

Syntax

Procedure OnItemExpanding Handle hItem ByRef Boolean bCancel

Description

The OnItemExpanding event is fired whenever an item is about to be opened. This event is fired before OnItemExpanded, and can be used as the trigger to create or delete child items.

Sample

This sample demonstrates the use of the bCancel parameter to cancel the opening of a TreeView item.

Procedure OnItemExpanding Handle hItem Boolean ByRef bCancel
    Move True to bCancel
End_Procedure