Chapter Contents

Previous

Next
UNPROTECT

UNPROTECT



Removes protection from a FRAME entry control or a field

Category: Control or Field


Syntax
Details
Example
See Also

Syntax

UNPROTECT wvar-names | _ALL_;

wvar-names
lists one or more window variables to unprotect, or _ALL_ to unprotect all window variables. To specify multiple names, use blanks to separate the names.

Type: Character


Details

Use UNPROTECT to temporarily override the PROTECT attribute. The variable to be unprotected cannot be an element of an array. To unprotect an array element, use FIELD.

When used with PROTECT, UNPROTECT enables you to unprotect and protect controls and fields selectively. Thus, you can force the user to enter values in a predetermined order.

If you unprotect a window variable with the UNPROTECT statement in FSEDIT applications and then issue the MODIFY command to edit the custom screen, the PROTECT attribute is removed for this variable in the PROTECT window.

FRAME entry controls can also use the _unprotect method. Unprotecting some FRAME entry controls (block, check box, icon, list box, pushbutton, radio box, scroll bar, and slider) is the same as calling the UNGRAY function or the _ungray method.


Example

Enable users to enter values for fields that were previously protected:

if (modified(tablename)) then
   do;
      protect tablename;
      unprotect vars;
      cursor vars;
      _msg_=
'Enter the names of the variables to be printed.';
   end;

See Also

DISPLAYED

ERROR

ERROROFF

ERRORON

FIELD

MODIFIED

PROTECT


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.