TreeNode.AOTDrop Method [AX 2012]
Creates a copy of a specified tree node as a child to the TreeNode object.
public boolean AOTDrop(TreeNode sourcenode, [TreeNode after])
Run On
CalledParameters
- sourcenode
- Type: TreeNode Class
The node that is dropped.
- after
- Type: TreeNode Class
The child node of the tree node that the source should be inserted after; optional.
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;
}
Community Additions
ADD
Show: