Expanding

Description

Occurs before a node in a TreeView DataWindow expands.

PowerBuilder event information

Event ID: pbm_dwnexpanding

Argument

Description

row

Long by value. The number of the first row in the group to be expanded.

grouplevel

Long by value. The TreeView level of the group to be expanded.


Return Values

Set the return code to affect the outcome of the event. Return 0 to continue processing (expand the selected node) or return any other value to cancel the expansion.

Usage

A TreeView node expands when the user clicks the State icon (+) in the TreeView DataWindow or uses any of the Expand methods.

The Expanding event occurs before the Expanded event.

Examples

The following statements in the Expanding event script display a message box that allows the user to cancel the operation:

Integer li_ret

li_ret = MessageBox("Expanding node",   &
   "Are you sure you want to expand this node?",  &
   Exclamation!, OKCancel!)
IF li_ret = 1 then   return 0ELSE   RETURN 1END IF

See also

Collapsing

Expanded