Application Developer Guide > Using Wave Widgets > Managing Widgets
  

Managing Widgets
Besides colors, fonts, and userdata values, two additional widget attributes can be managed by developers: widget visibility and sensitivity.
Showing/Hiding Widgets
The Show and Hide keywords to the WwSetValue function control whether a widget is visible or not. By default, all widgets are shown when they are created.
To hide a widget, use the Hide keyword:
status = WwSetValue(widget, /Hide)
To show a hidden widget, use the Show keyword:
status = WwSetValue(widget, /Show)
In these functions, the widget parameter is the widget ID of the widget you want to show or hide.
You can also test to determine if a widget is shown or hidden, using the Shown keyword in the WwGetValue function.
shown = WwGetValue(widget, /Shown)
If the widget is shown, the function returns 1; if hidden, 0 is returned.
Widget Sensitivity
If a widget is sensitive, some action will occur when the user selects the widget. For example, if the user clicks on a button that is sensitive, an action occurs. By default, all widgets are sensitive when they are created.
You can set a widget to nonsensitive with the Nonsensitive keyword in the WwSetValue function. When a widget is nonsensitive, its foreground color is grayed-out, and the widget cannot accept input from users.
status = WwSetValue(widget, /Nonsensitive)
To change the sensitivity of widgets, use the /Sensitive keyword:
status = WwSetValue(widget, /Sensitive)
To determine a widget’s sensitivity, use the Sensitive keyword in the WwGetValue function.
shown = WwGetValue(widget, /Sensitive)
The function returns 1 for sensitive; 0 for nonsensitive.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.