Chapter Contents |
Previous |
Next |
ACTIVATE |
Category: | Control or Field |
Syntax | |
Details | |
Examples | |
Example 1: Activating a Radio Box Station | |
Example 2: Activating a Station in an Extended Table | |
See Also |
Syntax |
rc=ACTIVATE(var-name,station<,row>); |
0 | successful |
0 | not successful |
Type: Numeric
Type: Character
>0 | is the number of the station to be activated. |
<0 | is the number of the station designated by the absolute value of the argument to be grayed instead of activated. Users cannot select a station that has been grayed. |
0 | indicates that no station is to be activated. |
Type: Numeric
Type: Numeric
Details |
ACTIVATE works only for Version 6 widgets in FRAME entries and for choice groups in PROGRAM entries. Version 8 controls use attribute settings to implement this functionality. ACTIVATE is not valid in FSEDIT or FSVIEW programs.
The station value is the number of the check box or the item or button in a check box or choice group. For example, if your application has three fields named A, B, and C, and they all belong to the same radio box, then you can make the B field active by passing 2 for the station value (B is the second field).
ACTIVATE makes a check box or an item in a radio box or choice group active by assigning the station or item number to the associated window variable. ACTIVATE grays a check box or an item in a radio box or choice group when you assign the negative number of the station or item. When a window element is grayed, users cannot select it.
FRAME entry controls can also use the _activate method.
For linked action fields in choice groups, the action-type pair is considered one station. Linked action fields have the following form:
& &A_____ & &B_____ & &C_____To make the linked action pair for B active, pass 2 for the value of station, not 4.
Examples |
Activate the second station in the radio box HOBBY:
rc=activate('hobby',2);
Make the third station in the fourth row of an extended table the active station in the choice group LIST:
if (activate('list',3,4)) then do; ...SCL statements to handle the error condition... end;
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.