
This method adds a child tree item or top level tree item after an indicated tree a child tree item or top level.
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_Tree_InsertAfter MyControlReference [as Reference] ReferenceKey [as String or Tree Node Handle] Text [as String] [Optional] Key [as String] [Optional] ImageIndex [as Integer] [Optional] SelectedImageIndex [as Integer] [Optional] ExpandedImageIndex [as Integer]) |
An alternative convention is to identify the control by providing the project file, the dialog name and the control name:
Copy Code |
|---|
(Odcl_Tree_InsertAfter ProjectFile [as String] DialogName [as String] ControlName [as String] ReferenceKey [as String or Tree Node Handle] Text [as String] [Optional] Key [as String] [Optional] ImageIndex [as Integer] [Optional] SelectedImageIndex [as Integer] [Optional] ExpandedImageIndex [as Integer]) |
Please specify a key when adding tree nodes in order to have expanded images.
If the tree control was populated using String keys , this method may incorrectly re-order the internal Key list so that String Keys will not match the correct node items. This is a design flaw of the Microsoft Tree Control and a work around has not be found.
Copy Code |
|---|
; Populate tree (Odcl_Tree_InsertAfter MyProject_MyForm_MyControl "C_Documents and Settings" "Program Files" "C_Program Files" ) |
Tree_AddChild (Using Lists), Tree_AddChild (Single Entry), Tree_AddParent (Using Lists), Tree_AddParent (Single Entry), Tree_Clear, Tree_DeleteItem