InvalidParentException

From Xojo Documentation

Revision as of 15:11, 23 February 2022 by Gperlman (talk | contribs) (Sample Code)
(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!

Class (inherits from RuntimeException)

You tried to get the parent of a control using the Parent property of the Control class, but its parent is in a different window. The parent control must be in the same window as the control or the parent is the containing window, not another control.

Properties
ErrorNumber Message
Methods
Stack StackFrames

Sample Code

This example tries to capture an invalid parent control.

Me.Parent = SendDemoWindow.PushButton1

Exception err As InvalidParentException
MessageBox("An InvalidParentException occurred!")

See Also

Parent property of the Control class; Exception, Try statements; RuntimeException class.