Migration Guide : E. Features Introduced in OpenROAD 6.2 : Changes to Existing Features : TreeviewField Class Gets New and Updated Attributes and Method
 
Share this page          
TreeviewField Class Gets New and Updated Attributes and Method
The TreeviewField class, which represents a single data item in a Tree object, has the following new attributes:
DragCopyCursor
Data Type: CursorBitmap
4GL Access: RW
The DragCopyCursor attribute—when assigned to a CursorBitmap object—causes the mouse cursor to change to the cursor associated with the CursorBitmap when a DragDrop operation becomes a copy operation by pressing the CTRL key while dragging from the TreeNode object.
DragMoveCursor
Data Type: CursorBitmap
4GL Access: RW
The DragMoveCursor attribute—when assigned to a CursorBitmap object—causes the mouse cursor to change to the cursor associated with the CursorBitmap when a DragDrop operation is begun from the TreeNode object.
DropCursor
Data Type: CursorBitmap
4GL Access: RW
The DropCursor attribute—when assigned to a CursorBitmap object—causes the mouse cursor to change to the cursor associated with the CursorBitmap when the mouse is over the TreeNode object during a DragDrop operation in which the node is a potential drop object.
ExactNodeHeight
Data Type: integer
4GL Access: RW
The ExactNodeHeight attribute, if greater than 0, defines the exact height of each node. You can use it to provide spacing between nodes if each node uses an identical font.
FullRowSelect
Data Type: integer
4GL Access: RW
The FullRowSelect attribute, if FALSE, indicates that nodes can be selected only by clicking on the bitmap or text label of the node. If TRUE, the node can be selected by clicking anywhere in the row of a node.
HasCheckBoxes
Data Type: integer
4GL Access: RW
The HasCheckboxes attribute, if TRUE, means that the TreeviewField will display check boxes. The default is FALSE.
HasHorizontalScrollbar
Data Type: integer
4GL Access: RW
The HasHorizontalScrollBar attribute is set to TRUE automatically when expansion of nodes causes some of the node labels to overflow the horizontal space allotted for the treeview.
HasScrollbar
Data Type: integer
4GL Access: RW
The HasScrollBar attribute is set to TRUE automatically when expansion of nodes causes some of the nodes to not be displayable in the vertical space allotted for the TreeviewField.
Indent
Data Type: integer
4GL Access: RW
The Indent attribute indicates how much indentation there is between different levels of the tree.
NodeHeight
Data Type: integer
4GL Access: R
The NodeHeight attribute provides the actual height of each node.
RightClickBehavior
Data Type: integer
4GL Access: RW
The RightClickBehavior attribute indicates the behavior when the user right-clicks the mouse on a node (or a non-node area of the treeview). Valid values are:
RB_NOSELECT—The Property Option Menu of the clicked node drops down (none drops down if no node is clicked on). The same node remains selected.
RB_SELECT—The Property Option Menu of the clicked node drops down (none drops down if no node is clicked on). The newly clicked-on node becomes selected.
RB_SELECT_ON_DROPDOWN—The Property Option Menu of the clicked node drops down (none drops down if no node is clicked on). The newly clicked-on node becomes temporarily selected while the menu is dropped down. Selection reverts to the previously selected node when the menu closes up.
SelBgColor
Data Type: integer
4GL Access: RW
The SelBgColor attribute controls the background color of the bounding rectangle of the selected node in the TreeviewField.
SelIsBold
Data Type: integer
4GL Access: RW
If SelIsBold is TRUE and the node is selected, it is made bold. Otherwise, if the TreeviewField's SelIsBold is TRUE, it is made bold. If neither is set, the TreeviewField's IsBold attribute determines whether it is bold.
SelNoFocusBgColor
Data Type: integer
4GL Access: RW
The SelNoFocusBgColor attribute controls the background color of the bounding rectangle of the selected node in the TreeviewField when the TreeviewField does not have the focus.
SelNoFocusFgColor
Data Type: integer
4GL Access: RW
The SelNoFocusFgColor attribute controls the foreground color of the bounding rectangle of the selected node in the TreeviewField when the TreeviewField does not have the focus.
Style
Data Type: integer
4GL Access: RW
Specifies the display style of the TreeviewField. Valid values include:
TVF_CLASSIC—Specifies the style of already existing TreeviewFields with automatically set attributes
TVF_EXTENDED—Indicates that this TreeviewField exhibits different behavior from TreeviewFields with the TVF_CLASSIC style
TVF_CURRENT—Specifies the latest style
TopNode
Data Type: TreeNode
4GL Access: RW
The TopNode attribute specifies the topmost visible TreeNode in the treeview. If TopNode is set and the treeview is vertically scrollable, it scrolls the value of TopNode to display the topmost visible node.
TreeHeight
Data Type: integer
4GL Access: R
The TreeHeight attribute provides the total height of both the visible part of the TreeviewField and, if part of the TreeviewField is scrolled out of view, it also includes that height.
TreeWidth
Data Type: integer
4GL Access: R
The TreeWidth attribute provides the total width of both the visible part of the TreeviewField and, if part of the TreeviewField is scrolled out of view, it also includes that width.
The following attributes are changed in this version of OpenROAD:
AllowLabelEdit
Data Type: integer
4GL Access: RW
The AllowLabelEdit attribute is a deprecated attribute. It is used only if the Style of the TreeviewField is TVF_CLASSIC. It should not be set and will not be honored for new TreeviewFields in an application, or for TreeviewFields that were modified to be no longer a TVF_CLASSIC style.
Tree
Data Type: Tree
4GL Access: RW
The Tree attribute specifies the Tree object containing TreeNodes.
Note:  The Tree attribute is now writable as well as readable. You can use it to construct a tree and assign it to a treeview.
The TreeviewField class has the following new method:
ExpandAll
Expands the specified node and all of its descendants. If the node is not specified or is NULL, it expands all nodes in the entire tree.
For complete information about the TreeviewField class, see the Language Reference Guide.