This method adds a box as a child of this box using the method specified by type.
Available values for type are listed below:
- default - Makes the box a direct child of this box.
- part - Makes the box a part of this box. (This box will be the boxes
parent gadget.)
- descendantPart - Specifies that the new box will have the same gadget
parent as this box.
function ReparentBox(box, newParent)
{
if (box && newParent)
{
var oldParent = box.parent;
oldParent.removeChild(box);
newParent.addChild(box);
}
}