From Xojo Documentation

Revision as of 15:33, 21 October 2021 by Gperlman (talk | contribs) (Notes)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Object )
aDesktopUIControl.Parent = newObjectValue
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.


If the control is on the window, the Parent will be the Window. 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.


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

Me.Parent = Nil