Share via


TreeNode.AOTDrop Method

Creates a copy of a specified tree node as a child to the TreeNode object.

Syntax

public boolean AOTDrop(TreeNode sourcenode, [TreeNode after])

Run On

Called

Parameters

  • after
    Type: TreeNode Class
    The child node of the tree node that the source should be inserted after; optional.

Return Value

Type: boolean
true if the drop operation was successful; otherwise, false.

Examples

The following example creates the tabPage:CopyOfContainers tree node as the last node underTab:Tab in the tutorial_Form_Controls form.

#AOT 
static void myJobAOTDrop(Args _args) 
{ 
    treeNode treeNodeTab; 
    treeNode treeNodeTabPageContainers; 
 
    treeNodeTab = TreeNode::findNode(#FormsPath + '\\' +  
        formStr(tutorial_form_controls)+ '\\Designs\\Design\\[Tab:Tab]'); 
 
    treeNodeTabPageContainers = TreeNode::findNode(#FormsPath + '\\' +  
        formStr(tutorial_form_controls)+  
        '\\Designs\\Design\\[Tab:Tab]\\[TabPage:Containers]'); 
 
    if (treeNodeTab && treeNodeTabPageContainers) 
    { 
        // Drop the TabPage:Containers node on the Tab:Tab node. 
        print treeNodeTab.AOTDrop(treeNodeTabPageContainers); 
    } 
    else 
    { 
        print "Could not find treeNodeTab or treeNodeTabPageContainers"; 
    } 
    pause; 
}

See Also

TreeNode Class

TreeNode.AOTadd Method