Chapter Contents

Previous

Next
GRAY

GRAY



Grays FRAME entry controls and stations of a choice group

Category: Control or Field


Syntax
Details
Example
See Also

Syntax

rc=GRAY(var-name<,station<,row>>);

rc
contains the return code for the operation:
0 successful
[ne]0 not successful

Type: Numeric

var-name
is the name of a window control or choice group to be grayed.

Type: Character

station
is the number of the button in a radio box or field in a choice group. This value must be greater than 0 and no larger than the total number of stations defined for the choice group. For PROGRAM entries, use the value 0 as a placeholder if the entire choice group at a specified row is to be grayed.

Type: Numeric

row
is the number of the row when the choice group is in the scrollable section of an extended table. Row can be used in PROGRAM entry programs but not for FRAME entry programs. Specify row only when you want to gray a station from outside an extended table's getrow or putrow section. Do not specify row if you want to gray a station from a getrow or putrow section.

Type: Numeric


Details

Users cannot select a FRAME entry control, choice group, or choice group station that is grayed.

For linked action fields in choice groups, the ACTION-type pair is considered one station. For example, the following line in a PROGRAM entry window defines three linked action fields:

& &A_____    & &B_____    & &C_____

To gray the linked action pair for field B, pass in 2 for the value of station, not 4.

Window controls can also use the _gray method. You cannot use GRAY in FSEDIT or FSVIEW programs.


Example

Prevent users from selecting CONTINUE when the value of AGE is less than 21:

if (age<21) then
      rc=gray('CONTINUE');
   else
      rc=ungray('CONTINUE');

See Also

ACTIVATE

ISACTIVE

ISGRAY

UNGRAY


Chapter Contents

Previous

Next

Top of Page

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