Protects a widget without updating its
data
- The results of the _protect method vary by the object (for example,
in some cases, _protect may not allow selection and in other cases, it also
may not allow tabbing). The _protect method is one of two mutually exclusive
methods that disable a widget so users cannot modify or select the widget.
The second method is described in _gray for this class. You cannot use the
_gray method to gray a widget that is already protected with the _protect
method, and vice versa.
- Use the _protect method rather than the _gray method to protect
a widget that is never selectable. For example, you may protect a SAS/GRAPH
Output widget that acts as the background for a frame. This prevents the _select
method from running when users select the widget. Icons, graphic text, and
widgets used for titles or other decoration should be protected with the _protect
method as well.
- You may also use the field or protect functions to protect a widget;
however, the _protect method is the only way to protect a widget from another
SCL entry such as a method.
Example
_protect protects a widget named libname.
libname._protect();
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.