Tree.property
property (DataWindow object)
Description
Settings for a TreeView DataWindow.
Applies to
TreeView DataWindows
Syntax
PowerBuilder dot notation:
|
1 |
dw_control.Object.DataWindow.Tree.property |
Describe and Modify argument:
|
1 |
"DataWindow.Tree.property { = value } " |
|
Parameter |
Description |
|---|---|
|
property |
A property that controls the appearance or behavior |
|
value |
(exp) A string value for the file name of the tree Value can be a quoted |
|
Property for Tree |
Value |
|---|---|
|
DefaultExpandToLevel |
A long value that is the default level of expansion Painter: Expand To Level By Default drop-down |
|
Indent |
A long value in the units specified for the Painter: Select or enter a value in the |
|
SelectNodeByMouse |
A boolean value that indicates whether you can Values are: Yes — You can select No — You Painter: Node By Mouse check |
|
ShowConnectLines |
A boolean value that indicates whether lines Values Yes — Display connecting lines No — Do not display connecting Painter: Show Lines check box. |
|
ShowLeafNodeConnectLines |
A boolean value that indicates whether lines Values are: Yes — No — Do not Painter: Connect Leaf |
|
ShowTreeNodeIcon |
A boolean value that indicates whether tree node Values are: No — Do Yes — Painter: Use Tree Node Icon |
|
StateIconAlignMode |
A long value that indicates how the state icon is Values are: 0 — Middle 1 — Top. 2 — Painter: State Icon Align Mode drop-down |
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 2 3 4 |
long ll_expandlevel dw1.Object.datawindow.tree.DefaultExpandToLevel = 1 ll_expandlevel = & dw1.Object.DataWindow.Tree.DefaultExpandToLevel |
The following code gets and sets the Indent value:
|
1 2 |
indentVal = dw1.Object.DataWindow.Tree.indent dw1.Object.DataWindow.Tree.indent = 80 |
The following examples manipulate the SelectNodeByMouse
property:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
if cbx_selectnodebymouse.checked then ls_selectnodebymouse='yes' else ls_selectnodebymouse='no' end if ls_ret=dw1.modify("datawindow.tree.selectnodebymouse='"+ls_selectnodebymouse+"'") if len(ls_ret)>0 then Messagebox("",ls_ret) end if ls_selectnodebymouse=dw1.Describe("datawindow.tree. selectnodebymouse") if lower(ls_selectnodebymouse)='no' then cbx_selectnodebymouse.checked=false else cbx_selectnodebymouse.checked=true end if dw1.modify("datawindow.tree.selectnodebymouse='yes'") dw1.Describe("datawindow.tree.selectnodebymouse") |
The following examples manipulate the show connecting lines
properties:
|
1 2 3 4 5 6 7 8 9 10 |
boolean lb_ShowLines, lb_ShowLeafLines lb_ShowLines = & dw1.Object.DataWindow.Tree.ShowConnectLines dw1.Object.DataWindow.Tree.ShowConnectLines='yes' lb_ShowLeafLines = dw1.Object.DataWindow.Tree. ShowLeafNodeConnectLines dw1.Object.DataWindow.Tree.ShowLeafNodeConnectLines =& 'yes' |
The following example gets the current value of the
StateIconAlignMode property and sets it to be aligned at the top:
|
1 2 |
ls_StateIconAlignMode = dw1.Object.DataWindow.Tree.StateIconAlignMode //Align Top dw1.Object.DataWindow.Tree.StateIconAlignMode = 1 |