IsExpanded

Description

Performs a test to see whether a group in a TreeView DataWindow with the specified TreeView level is expanded, and whether the group includes the specified row.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control

Syntax

PowerBuilder

Boolean dw_control.IsExpanded(long row, long groupLevel)

Argument

Description

dw_control

A reference to a TreeView-style DataWindow control

row

The number of the row that belongs to the group

groupLevel

The TreeView level of the group

Returns

Returns true if the group is expanded and false if the group is not expanded. IsExpanded also returns false if the DataWindow is not a TreeView DataWindow or the row or groupLevel is invalid.

Usage

A TreeView DataWindow has several TreeView level bands (groups) that can be expanded and collapsed. You can use the IsExpanded method to test whether or not a group in a TreeView DataWindow is expanded.

Examples

Example 1

The following example performs a test to determine whether the group that contains row 3 at TreeView level 2 is expanded:

boolean lb_expanded
lb_expanded = dw_treeview.IsExpanded(3,2)

See also