Application Developer Guide > Using the Widget Toolbox > Managing, Displaying, and Destroying Widgets
  

Managing, Displaying, and Destroying Widgets
Except for top-level shell widgets, all widgets must be “managed” by a parent widget. A widget’s parent manages the widget’s size and location, determines whether or not the widget is mapped (associated with an X window), and also controls the input focus of the widget.
By default all widgets are managed when created. To unmanage a widget after creation, use the WtSet function with the Unmanage keyword. For example:
status=WtSet(wid, /Unmanage)
To display a widget hierarchy, “realize” the shell widget of a hierarchy using the WtSet function with the Realize keyword. For example:
status=WtSet(shellid, /Realize)
To undisplay an individual widget, “unmanage” it using WtSet with the Unmanage keyword. For example:
status=WtSet(wid, /Unmanage)
To undisplay a whole widget hierarchy, unmanage the shell widget using WtSet with the Unmanage keyword. For example:
status=WtSet(shellid, /Unmanage)
To destroy a widget use WtSet with the Destroy keyword. For example:
status=WtSet(wid, /Destroy)
To destroy and close a whole widget hierarchy, use the WtClose function. For example:
status=WtClose(shellid)
See the example Widget Toolbox application at the end of this chapter.
 
note
Rogue Wave has ported a subset of the Widget Toolbox (Wt) functionality that is available for Motif to Microsoft Windows. Because the Widget Toolbox under Windows is not a complete implementation, we recommend that Windows developers use the PV-WAVE 10.0 Widgets (Ww) layer or the VDA Tools when developing GUI applications.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.