MoveBefore Method (parent, nextSibling)

Pageflex Document Action API

Pageflex Document Action API MoveBefore Method (parent, nextSibling)
Namespaces > Pageflex.Scripting > Element > MoveBefore(Element, Element)
Moves this Element to a different place in the document tree.
Syntax
C# Visual Basic Managed C++
public void MoveBefore (
	Element parent,
	Element nextSibling
)
Public Sub MoveBefore ( _
	parent As Element, _
	nextSibling As Element _
)
public:
void MoveBefore (
	Element^ parent, 
	Element^ nextSibling
)
Parameters
parent (Element)
Element which will become this element's parent.
nextSibling (Element)
Element which will become this element's next sibling.
Remarks
This element is removed from its current location in the document tree and inserted as a child of the parent element, just before the nextSibling element. If nextSibling is nullNothingnullptr, this element is inserted as the last child of the parent element.

Note: changing the order of sibling shapes does not change their draw order. See instead NextShapeToDraw.

Exceptions
Exception Condition
InvalidChildElementTypeException An element of this type cannot be a child of the specified parent.
InvalidContainerException The specified parent is not a container.
WrongParentException parent is not the parent of nextSibling.
ArgumentNullException The value supplied for parent was nullNothingnullptr.
StaleScriptingObjectException This object's associated internal object no longer exists.

Assembly: PFScript Version: 8.0.7.1407 (Module: PFScript)