Tree.property – PB Docs 126

Tree.property DataWindow object property

Description

Settings for a TreeView DataWindow.

Controls

TreeView DataWindows

Syntax

PowerBuilder dot notation:

Describe and Modify argument:

Parameter

Description

property

A property that controls the appearance
or behavior of the TreeView DataWindow. Properties and their settings
are listed in the table below.

value

(exp) A string value
for the file name of the tree node icon in the detail band.

Value can be a quoted DataWindow expression.

Property for Tree

Value

DefaultExpandToLevel

A long value that is the default level
of expansion for the TreeView DataWindow. For example, if the default
level is 2, only data with a level less than or equal to 2 is expanded
by default.The value must represent a valid level.

Painter: Expand To Level By Default drop–down list
on the General page in the Properties view. The list displays the
levels that have been created for the DataWindow.

Indent

A long value in the units specified for
the DataWindow that defines the position of the state icon. The
state icon is a plus (+) or minus (-) sign that indicates whether
the tree node is in a collapsed or expanded state. The icon’s
indent indicates the level of the node in the tree. The X position
of the state icon is the X position of its parent plus value.

Painter: Select or enter a value in the Indent Value box on
the General page.

SelectNodeByMouse

A boolean value that indicates whether
you can select a tree node by clicking the node with the mouse.

Values are:

  • Yes – You
    can select a tree node with a mouse-click (default).

  • No – You cannot select a tree node with
    a mouse-click.

Painter: Node By Mouse check box.

ShowConnectLines

A boolean value that indicates whether
lines connecting parents and children display in the DataWindow
object. This property is not supported by the Web DataWindow. If
you want to show lines connecting rows in the detail band to their
parent, you must also set ShowLeafNodeConnectLines.

Values are:

  • Yes – Display
    connecting lines (default).

  • No – Do not display connecting lines.

Painter: Show Lines check box.

ShowLeafNodeConnectLines

A boolean value that indicates whether
lines connecting rows in the detail band to their parent display
in the DataWindow object. This property is disabled if Show Lines
box is not set. This property is not supported by the Web DataWindow.

Values are:

  • Yes – Display
    connecting lines (default).

  • No – Do not display connecting lines.

Painter: Connect Leaf Nodes check box.

ShowTreeNodeIcon

A boolean value that indicates whether
tree node icons for level and detail bands display. If this property
is not set, the Expanded and Collapsed Tree Node Icon File properties
on the General properties page for each TreeView level are disabled.

Values are:

  • No – Do
    not display tree node icons (default).

  • Yes – Display tree node icons.

Painter: Use Tree Node Icon check box.

StateIconAlignMode

A long value that indicates how the state
icon is aligned vertically with respect to the TreeView level band.

Values are:

  • 0 – Middle
    (default).

  • 1 – Top.

  • 2 – Bottom.

Painter: State Icon Align Mode drop-down list.

Usage

In the painter

Select the control and set values in the Properties view, General
tab.

Examples

The following code sets and gets the long value that
determines how many levels of the TreeView are expanded by default:

The following code gets and sets the Indent value:

The following examples manipulate the SelectNodeByMouse
property:

The following examples manipulate the show connecting
lines properties:

The following example gets the current value of the
StateIconAlignMode property and sets it to be aligned at the top:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x