|
|
|
|
|
- "Sibling" node
- Duplicates
- Format of collapsed/expanded images
- Type of collapsed/expanded images
TreeInsert (Function) In french: ArbreInsère Inserts a leaf into a TreeView control at a specific position. This insertion is performed in relation to an existing "sibling" element. Example of TreeView control: // Insert the "Cakes" leaf on the same level as // the "Ice creams" leaf in the "TREE_TVRecipe" TreeView control // The "Cakes" leaf will be inserted before the "Ice creams" leaf Res = TreeInsert(TREE_TVRecipe, "Recipes" + TAB + "Desserts" + TAB + "Ice creams", ... "Cakes", tvDefault, tvDefault, Null, tvBefore)
Syntax
<Result> = TreeInsert(<TreeView control> , <Path of sibling node> , <Leaf name> [, <Collapsed image> [, <Expanded image> [, <Leaf identifier> [, <Addition mode> [, <Tooltip text>]]]]])
<Result>: Boolean - True if the leaf was inserted into the TreeView control,
- False otherwise.
<TreeView control>: Control name Name of the TreeView control to be used. <Path of sibling node>: Character string Full path of "sibling" node of leaf that will be inserted into the TreeView control. This sibling node must exist. This parameter has the following format:
"<Root name>" + TAB + ["<Name of 1st node>" + TAB + ... ["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>" In case of duplicates on a path element, this path can contain the element identifier (specified at the end of its name by TreeID). <Leaf name>: Character string Name (caption) of leaf to insert. <Collapsed image>: Optional character string or constant Image associated with the inserted element. This image is displayed when the element is a collapsed node (see the Notes). At runtime, the caption of a collapsed node is preceded by "+". This parameter corresponds to:- the name and full (or relative) path of image. A UNC path can be used.
- the constant:
| | Null | No image | tvDefault (Default value) | Default image (closed folder): |
<Expanded image>: Optional character string or constant Image associated with the inserted element. This image is displayed when the element is an expanded node (see the Notes). At runtime, the caption of an expanded node is preceded by "-". This parameter corresponds to:- the name and full (or relative) path of image. A UNC path can be used.
- the constant:
| | Null | No image | tvDefault (Default value) | Default image (opened folder): |
<Leaf identifier>: Character string or integer (optional) Character string or integer associated with the inserted element. This parameter corresponds to an empty string ("") by default. To associate an identifier with an element that is already created, use TreeModify. <Addition mode>: Optional constant Position of inserted leaf in relation to the "sibling" node in the TreeView control. | | tvAfter (Default value) | The leaf is inserted after the specified "sibling" element. | tvBefore | The leaf is inserted before the specified "sibling" element. |
<Tooltip text>: Optional character string If this parameter is specified, its content will be displayed in a tooltip when the element is hovered by the mouse cursor. This parameter corresponds to an empty string by default. If no tooltip is associated with the element, the tooltip associated with the TreeView control will be automatically displayed. Remarks "Sibling" node The insertion is not performed if the "sibling" node does not exist: TreeInsert returns False. Duplicates TreeInsert does not control duplicates when an element is inserted. Format of collapsed/expanded images Type of collapsed/expanded images The images used can be: The specified image is proportionally resized to 16 x 16 pixels: in most cases, the height of the image corresponds to the height of TreeView row. Remark: The size of images should be set to 16 x 16 pixels (size of small icons).
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|