ParentWindow

(Engine-Level Function)

Description: Returns the object value of the nearest non-child window.
Returns: Window Object
Usage: Script or steady state.
Function Groups: Graphics,  Window
Related to: ActiveWindow | RootWindow
Format:  ParentWindow(Object)
Parameters:  
Object
Required. Any object (the object value of any running module instance).
Comments:

This function will start at the object value given and find the first window which is not a child window. If there is no window found the return value will be invalid.

For modules in non-child windows (i.e. one without bit 9 set), RootWindow and ParentWindow will return the same value.
For child windows, RootWindow will return the root module in the child window, while ParentWindow will return the root module in the child window's closest non-child calling window.

To test whether a custom widget is being displayed while in "editing mode" (that is, in the Idea Studio) you can test whether ParentWindow()\Editing is TRUE or FALSE.