
This method adds one or more child tree item to a other child tree item.
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_Tree_AddChild MyControlReference [as Reference] (list (list ParentKey [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]) (list ParentKey [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_AddChild ProjectFile [as String] DialogName [as String] ControlName [as String] (list (list ParentKey [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]) (list ParentKey [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 create lists as follows using the list keyword:
(list (list x y ...) (list x y ...) ...)
It seems that ObjectARX does not always handle lists created as follows:
'(x y ...) (x y ...) ...
Please specify a key when adding tree nodes in order to have expanded images.
Copy Code |
|---|
; Populate tree (Odcl_Tree_AddChild MyProject_MyForm_MyControl (list (list "C_" "Documents and Settings" "C_Documents and Settings" 1 1 3) (list "C_" "Program Files" "C_Program Files" ) (list "C_" "Windows" "C_Windows" ) ) ) |
Tree_AddChild (Single Entry), Tree_AddParent (Using Lists), Tree_AddParent (Single Entry), Tree_Clear, Tree_DeleteItem, Tree_InsertAfter