Tree.property DataWindow object property
Description
Settings for a TreeView DataWindow.
Controls
TreeView DataWindows
Syntax
PowerBuilder dot notation:
1 |
<span>dw_control</span>.Object.DataWindow.Tree.<span>property</span> |
Describe and Modify argument:
1 |
"DataWindow.Tree.<span>property</span> { = <span>value</span> } " |
Parameter |
Description |
---|---|
property |
A property that controls the appearance |
value |
(exp) A string value Value can be a quoted DataWindow expression. |
Property for Tree |
Value |
---|---|
DefaultExpandToLevel |
A long value that is the default level Painter: Expand To Level By Default drop–down list |
Indent |
A long value in the units specified for Painter: Select or enter a value in the Indent Value box on |
SelectNodeByMouse |
A boolean value that indicates whether Values are:
Painter: Node By Mouse check box. |
ShowConnectLines |
A boolean value that indicates whether Values are:
Painter: Show Lines check box. |
ShowLeafNodeConnectLines |
A boolean value that indicates whether Values are:
Painter: Connect Leaf Nodes check box. |
ShowTreeNodeIcon |
A boolean value that indicates whether Values are:
Painter: Use Tree Node Icon check box. |
StateIconAlignMode |
A long value that indicates how the state Values are:
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:
1 |
long ll_expandlevel<br>dw1.Object.datawindow.tree.DefaultExpandToLevel = 1<br>ll_expandlevel = &<br>   dw1.Object.DataWindow.Tree.DefaultExpandToLevel |
The following code gets and sets the Indent value:
1 |
indentVal = dw1.Object.DataWindow.Tree.indent<br>dw1.Object.DataWindow.Tree.indent = 80 |
The following examples manipulate the SelectNodeByMouse
property:
1 |
if cbx_selectnodebymouse.checked then    ls_selectnodebymouse='yes' <br>else<br>   ls_selectnodebymouse='no'<br>end if<br>ls_ret=dw1.modify("datawindow.tree.selectnodebymouse='"+ls_selectnodebymouse+"'") |
1 |
<br>if len(ls_ret)>0 then Messagebox("",ls_ret)<br>end if |
1 |
ls_selectnodebymouse=dw1.Describe("datawindow.tree.<br>selectnodebymouse")<br>if lower(ls_selectnodebymouse)='no' then<br>   cbx_selectnodebymouse.checked=false<br>else<br>   cbx_selectnodebymouse.checked=true<br>end if |
1 |
dw1.modify("datawindow.tree.selectnodebymouse='yes'")<br>dw1.Describe("datawindow.tree.selectnodebymouse") |
The following examples manipulate the show connecting
lines properties:
1 |
boolean lb_ShowLines, lb_ShowLeafLines<br>lb_ShowLines =  &<br>   dw1.Object.DataWindow.Tree.ShowConnectLines<br>dw1.Object.DataWindow.Tree.ShowConnectLines='yes' |
1 |
lb_ShowLeafLines = dw1.Object.DataWindow.Tree.<br>ShowLeafNodeConnectLines |
1 |
dw1.Object.DataWindow.Tree.ShowLeafNodeConnectLines =&<br>   'yes' |
The following example gets the current value of the
StateIconAlignMode property and sets it to be aligned at the top:
1 |
ls_StateIconAlignMode = dw1.Object.DataWindow.Tree.StateIconAlignMode |
1 |
//Align Top dw1.Object.DataWindow.Tree.StateIconAlignMode = 1 |