DesktopUIControl.Parent

From Xojo Documentation

Revision as of 02:54, 24 November 2021 by Gperlman (talk | contribs) (Notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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