Settings for a TreeView DataWindow.
TreeView DataWindows
Describe and Modify argument:
"DataWindow.Tree.property { = value } “
DataWindow .NET dot notation:
dw_control.TreeViewProperties.property
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. |
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. |
SelectNodeByMouse |
A boolean value that indicates whether you can select a tree node by clicking the node with the mouse. Values are:
|
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:
|
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:
|
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 Name properties in the General category for each TreeView level are disabled. Values are:
|
StateIconAlignMode |
A long value that indicates how the state icon is aligned vertically with respect to the TreeView level band. Values are:
|
Select the control and set values in the Properties window, General category.
The following code gets and sets the Indent value:
indentVal = dw1.Object.DataWindow.Tree.indent dw1.Object.DataWindow.Tree.indent = 80
The following examples manipulate the SelectNodeByMouse property:
if cbx_selectnodebymouse.checked then ls_selectnodebymouse='yes' else ls_selectnodebymouse='no' end if ls_ret=dw1.modify("datawindow.tree.selectnodebymouse='"+ls_selectnodebymouse+"'")
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:
bShowLines = dw1.TreeViewProperties.ShowConnectLines dw1.TreeViewProperties.ShowConnectLines=true;
bShowLeafLines = dw1.TreeViewProperties. ShowLeafNodeConnectLines;
dw1.TreeViewProperties.ShowLeafNodeConnectLines=true;
The following example gets the current value of the StateIconAlignMode property and sets it to be aligned at the top:
lAlign = dw1.TreeViewProperties.StateIconAlignMode;
//Align Top dw1.TreeViewProperties.StateIconAlignMode = 1;