Create window families
- Last Updated: May 1, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
By default, when you create a window, the AVM parents that window transparently to the window
system. In this way, windows you create are siblings of each other. You can also parent
a window to another window by setting the one window’s PARENT attribute
to the handle of the other. Windows that are parented to another window form a window
family. A window parented directly to the window system can be called the root window of
a window family. Windows parented by any child window, in turn, form a child window
family. A window can be parented to only one other window at a time, but can have
multiple child windows.
Window families share a number of properties that make them convenient for both applications and users to manage:
- Coordinated viewing and hiding — When you view any member of a window family (by
setting its
VISIBLEattribute to true, setting itsHIDDENattribute to false, or using theVIEWstatement), the whole window family is viewed unless theHIDDENattribute is true for at least one other member. IfHIDDENis true for a parent or other ancestor of the window that is viewed, no windows in the family are viewed. The only effect is that theHIDDENattribute for the window you try to view is set to false. If, on the other hand, any child or descendant window hasHIDDENset to true, then all the windows in the family are viewed, except the descendant window and its descendants. When you hide a member of a window family by setting itsVISIBLEattribute to false, that window and all its descendants are hidden, but theirHIDDENattributes are not changed. In this way, you can hide and view an entire family of windows by changing theVISIBLEattribute of the top window. You can leave any window or part of a hierarchy of windows out of the hiding and viewing by setting theHIDDENattribute of the window at the head of that part of the hierarchy to true. - Coordinated minimizing and restoring — When you minimize a window, all of its descendants disappear from view, unless they are already minimized. Any minimized descendants appear separately in the taskbar and can be restored individually. When you restore a parent window, any of its hidden descendants are redisplayed.
- Coordinated close events — If a parent window receives a
WINDOW-CLOSEevent, it propagates thePARENT-WINDOW-CLOSEevent to all of its descendant windows. ABL supports these as two separate events so that a procedure can react in a special way to the parent of its window being closed. TheWINDOW-CLOSEevent does not propagate any events upward to its parent window.