| Search Locate Previous Next | Contents |
Description
A standard Windows95 tree which may also be used to select multiple entries using the Checked property.
Index should an integer index into ...
Structure which defines the tree labels, depth and optional image
The Structure should be a nested text vector and a parallel column of level numbers with optional imageindex in column-3. The level numbers must start with level-0, but you may have as many 0-level items as you like. The levels must work down incrementally, but may step out in jumps, for example 0 1 1 2 3 1 2 2 0 1 is valid, but 0 2 2 1 2 4 0 1 is not.
Use the SetImage function to attach an ImageList (see the IL class) on creation. The optional 3rd column gives the positions of your icons in this list. Use 16 x 16 icons for preference and ensure that the ImageList is defined on the form before the tree! The optional 4th column is a boolean with 1 where the node should be expanded.
Class Property Table
| Name | Type | Default | Description |
| Hint | String | ||
| Editable | Bool | Item labels may be edited by the user with F2 | |
| Style | ManyOf | ||
| 3D | OneOf | Recess | Border style |
| Index | User | Index of selected line | |
| Structure | User | Tree structure [;vtv level {imageindex} {expanded} ] | |
| Checked | User | Selected items (integer vector 1=Y 0=N ¯1=Some) | |
| Propagate | Bool | 1 | Propagate selection up/down tree |
| Expanded | User | Which items are opened up (boolean vector) | |
| DragSource | Bool | User can drag items off this control | |
| DragMode | OneOf | Permitted drag operations | |
| DropAccept | StringList | Accepts drag-over and drag-drop from these groups |
Class-specific Events
| IDC | Item double-clicked |
| DRAGOFF | Item dragged off the tree |
| DRAGOVER | Item draggged over the tree |
| DRAGDROP | Item dropped on the tree |
| EDIT | Item label edited by user |
| RMM | Right-mouse menu request |
Class-specific Functions
| AddChildren | Add item(s) as children of specific item |
| AddItems | Add same-depth item(s) after specific item |
| AutoExpand | Set Expand depth on refresh |
| CollapseAll | Curl up entire tree |
| CollapseItems | Collapse specified item(s) |
| DeleteChildren | Delete all children of specified item(s) |
| DeleteItems | Delete specified item(s) and their children |
| EnsureVisible | Ensure specific item visible |
| ExpandAll | Uncurl entire tree |
| ExpandItems | Expand selected item(s) |
| GetAncestors | Indices of ancestors of specified item (nearest to most distant) |
| GetChildren | Indices of first-generation children of specified item |
| GetDescendants | Indices of all children, grandchildren, etc., of specified item |
| GetFirstVisible | Return index of first visible item |
| GetItemDepth | Return depth of specified item(s) |
| GetItemImage | Return index of image of specified item(s) |
| GetSiblings | Indices of siblings of specified item |
| GetVisibleCount | Return number of visible items |
| SetFirstVisible | Scroll to make specified item the first one visible |
| SetImage | Attach image list |
| SetItemImage | Set image(s) associated with item(s) |
| ShowItem | Show specified item |