TreeView control
A TreeView control is a hierarchical display of information. Each
item in a TreeView control consists of text and pictures, which can be
manipulated during program runtime.
Properties
|
TreeView property |
Datatype |
Description |
|---|---|---|
|
Integer |
Specifies the ASCII value of the accelerator key |
|
|
String |
A description of the control and/or its purpose for |
|
|
String |
A label that briefly describes the control, such as |
|
|
AccessibleRole (enumerated) |
Describes what kind of user interface element the |
|
|
Long |
Specifies the numeric value of the background |
|
|
Boolean |
Specifies whether the control has a border. Values TRUE — Control has a border. FALSE |
|
|
BorderStyle (enumerated) |
Specifies the border style of the control. Values StyleBox! StyleLowered! StyleRaised! StyleShadowBox! |
|
|
Boolean |
Specifies whether PowerBuilder moves the control to TRUE FALSE — |
|
|
CheckBoxes |
Boolean |
Specifies whether the state images are replaced by TRUE — Check FALSE — Check boxes are not The state of an item’s check box can be Unchecked = 1 Checked = |
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
Boolean |
Specifies whether the user can delete a TreeView TRUE — The user can delete items from the FALSE — The user cannot delete items from |
|
|
Boolean |
Disable Drag Drop determines whether events for TRUE — Drag FALSE — Drag events are |
|
|
Boolean |
Specifies whether PowerBuilder puts the control TRUE — FALSE — When the control is clicked, the In either case, DisableDragDrop must be |
|
|
String |
Specifies the name of the stock icon or the file When the user drags the control, the |
|
|
Boolean |
Specifies whether the user can edit the item labels TRUE — The user can edit item FALSE — The user cannot edit item |
|
|
Boolean |
Specifies whether the control is enabled (can be TRUE — Control can be FALSE — Control cannot be |
|
|
String |
Specifies the name of the typeface in which the |
|
|
FontCharSet (enumerated) |
Specifies the font character set used for the text |
|
|
FontFamily (enumerated) |
Specifies the font family (type style) used for the AnyFont! Decorative! Modern! Roman! Script! Swiss! |
|
|
FontPitch (enumerated) |
Specifies the font pitch for the text in the Default! Fixed! Variable! |
|
|
FullRowSelect |
Boolean |
Specifies whether full row selection is enabled. TRUE — Clicking anywhere on a row FALSE — Selecting one item in a row This property cannot be used in |
|
Boolean |
Specifies whether TreeView parent items have + and TRUE — FALSE — Parent items do If SingleExpand is set to true to |
|
|
Boolean |
Specifies whether TreeView items are connected by TRUE — Items are connected by FALSE — Items are not connected by |
|
|
Integer |
Specifies the height of the control, in |
|
|
Boolean |
Specifies whether selected text stays selected TRUE — Text does not stay FALSE — Text stays |
|
|
ImeMode |
Integer |
Specifies the input method editor mode. This |
|
Integer |
Specifies the size, in PowerBuilder units, that Room is always reserved for the regular |
|
|
Boolean |
Specifies whether the text in the control is TRUE — Text is FALSE — Text is not italic. |
|
|
Boolean |
Specifies that the layout of the control should be TRUE — Elements in the control are right FALSE — Elements in the control are left |
|
|
Boolean |
Specifies whether PowerBuilder will connect TRUE — FALSE — Control does not connect root |
|
|
Integer |
Specifies the size, in pixels, for the height of In a script, this value If the picture height is 0, PowerBuilder |
|
|
Long |
Specifies the color to be transparent when used in |
|
|
String |
Specifies the names of the files containing the Not updated after |
|
|
Integer |
Specifies the size, in pixels, for the width of the In a script, this value can If the picture width is 0, PowerBuilder uses |
|
|
String |
Specifies the name of the stock pointer or the file |
|
|
Boolean |
Specifies that characters should be displayed in TRUE — Characters display in right-to-left FALSE — Characters display in left-to-right |
|
|
SingleExpand |
Boolean |
Specifies whether only the selected TreeView item TRUE — When an item is selected, it is FALSE — More than one item Note that if HasButtons = |
|
grSortType |
Selects the sort method. Values Ascending! — Alphabetic by Descending! — Reverse-alphabetic by UserDefinedSort! — According to the script Unsorted! — Not When SortType specifies sorting, sorting |
|
|
Integer |
Specifies the size, in pixels, for the height of In a script, this value can be If the state picture height is 0, |
|
|
Long |
Specifies the color to be transparent when used in |
|
|
String |
Specifies the name of the picture used as the state The picture can be an icon, cursor, or bitmap |
|
|
Integer |
Specifies the size in pixels for the width of the In a script, this value can be set If the state picture width is 0, PowerBuilder |
|
|
Integer |
Specifies the tab value of the control within the |
|
|
String |
Specifies the tag value assigned to the |
|
|
Long |
Specifies the numeric value of the color used for |
|
|
Integer |
Specifies the size of the text in the control, in For backward compatibility, the size is |
|
|
ToolTips |
Boolean |
Specifies whether an item’s label should be TRUE — Tooltips FALSE — |
|
TrackSelect |
Boolean |
Specifies whether items appear in a different color TRUE — An item changes color when the mouse FALSE — An item does not change |
|
Boolean |
Specifies whether the text in the control is TRUE — Text is FALSE — Text is not |
|
|
Boolean |
Specifies whether the control is visible. Values TRUE — Control is visible. FALSE |
|
|
Integer |
Specifies the stroke weight of the text in the |
|
|
Integer |
Specifies the width of the control, in PowerBuilder |
|
|
Integer |
Specifies the X position (the distance from the |
|
|
Integer |
Specifies the Y position (the distance from the top |
Events
|
TreeView event |
Occurs |
|---|---|
|
When the user begins a drag operation with the left |
|
|
When the user starts to edit a TreeView item label. |
|
|
When the user begins a drag operation with the |
|
|
When the control is clicked. |
|
|
When the object is created, immediately before the |
|
|
When a TreeView item is deleted. |
|
|
When the object is destroyed, immediately after the |
|
|
When the control is double-clicked. |
|
|
When a dragged control is dropped on the TreeView |
|
|
When a dragged control enters the control, |
|
|
When a dragged control leaves the control, |
|
|
When a dragged control is within the control, but |
|
|
When the user finishes editing a TreeView item |
|
|
Just before the control receives focus (before it |
|
|
When the user presses the F1 key or drags the |
|
|
When an item has collapsed. |
|
|
When an item is collapsing. Return 1 to prevent |
|
|
When an item has expanded. |
|
|
When an item is expanding. Return 1 to prevent If you want to populate If no children are created |
|
|
When an item is expanding for the first time. If |
|
|
When the user presses a key. |
|
|
When the control loses focus (becomes |
|
|
When a TreeView control sends a wm_notify message |
|
|
When a Windows message occurs that is not a |
|
|
When the control is right-clicked. |
|
|
When the control is right |
|
|
When the selection has changed. |
|
|
When the selection is changing. Return 1 to prevent |
|
|
When sorting occurs and the SortType property is |
Functions
|
TreeView function |
Datatype returned |
Description |
|---|---|---|
|
Integer |
Adds an icon, cursor, or bitmap to the image list. |
|
|
Integer |
Adds an icon, cursor, or bitmap to the state image |
|
|
String |
Returns the name of the control. |
|
|
Integer |
Collapses the specified TreeView |
|
|
Integer |
Deletes the specified TreeView item and all its |
|
|
Integer |
Deletes the specified icon, cursor, or bitmap from |
|
|
Integer |
Deletes all icons, cursors, or bitmaps from the |
|
|
Integer |
Deletes the specified icon, cursor, or bitmap from |
|
|
Integer |
Deletes all icons, cursors, or bitmaps from the |
|
|
Integer |
Starts or ends the dragging of a TreeView |
|
|
Integer |
Starts the editing of a specific TreeView item |
|
|
Integer |
Expands the children and subsequent levels for the |
|
|
Integer |
Expands the specified TreeView item. |
|
|
Long |
Returns the handle for the specified TreeView |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
Integer |
Retrieves information for a specified |
|
|
Integer |
Gets the handle or the index of the item under the |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Integer |
Hides the specified TreeView item. |
|
|
Long |
Inserts a specified item at a specified position |
|
|
Long |
Inserts a specified item as the first item at a |
|
|
Long |
Inserts a specified item as the last item at a |
|
|
Long |
Inserts a specified item at a specified level in |
|
|
Integer |
Moves a control or object to a specified |
|
|
Integer |
Determines the distance from the left edge of an |
|
|
Integer |
Determines the distance from the top edge of an |
|
|
Boolean |
Adds the event to the end of the event queue of an |
|
|
Integer |
Includes an object or lines of text in a print |
|
|
Integer |
Resizes a control to the specified |
|
|
Integer |
Highlights an item in the control, making it the |
|
|
Integer |
Designates the specified TreeView item as the |
|
|
Integer |
Sets the specified TreeView item as the first item |
|
|
Integer |
Sets the focus for a specified object or |
|
|
Integer |
Sets the information for the specified TreeView |
|
|
Integer |
Specifies a picture index for all TreeView items at |
|
|
Integer |
Maps a picture index to an overlay picture index. |
|
|
Integer |
Sets the position of the TreeView control in the |
|
|
Integer |
Controls the automatic redraw of an object after |
|
|
Integer |
Makes an object or control visible, if it is |
|
|
Integer |
Sorts the children of a specified TreeView item |
|
|
Integer |
Sorts the children of an item and all subsequent |
|
|
Integer |
Triggers a specified event in the control and |
|
|
Object |
Returns the type of the control. |