DesktopUIControl.Parent

From Xojo Documentation

Property (As Object )
aDesktopUIControl.Parent = newObjectValue
or
ObjectValue = aDesktopUIControl.Parent

New in 2021r3

Supported for all project types and targets.

Used to get and set the control’s parent control or window.

Notes

If the control is on the window, the Parent will be the Window. If the control is on the container, the Parent will be the container. If the control is completed enclosed by another control, the Parent will be that control.

If you do not want the enclosing control to be the parent, set the Parent property of that control to Nil to make it the Window.

If the parent control is somehow in another window, an InvalidParentException will occur.

Example

The following example sets the parent of the control to the window.

Me.Parent = Nil