Chapter Contents |
Previous |
Next |
Radio Box: _repopulate |
Syntax | |
Details | |
Example |
Syntax |
CALL NOTIFY (radio-box-name, '_repopulate'); |
Details |
The radio box is refilled based on the value of
Fill type
in the Radio Box Attributes window.
The _update method for radio boxes works the same as the _repopulate method if the radio boxes are not in an extended table. If radio boxes are in an extended table, the _update method works the same as the _refresh method.
Note: The _repopulate method performs some processing that must take place before a radio box is repopulated.
Therefore, if you write your own method to customize the processing, you must call the _repopulate method of the parent class as the first command in the method you write.
Use the CALL SUPER routine to call the _repopulate method of the parent class:
POPULATE: method; call super(_self_,'_repopulate_'); /* scl code to repopulate radio box */ endmethod;
Example |
This example shows how the _repopulate method uses the current values of the source to fill the radio box. Assume that the Attributes window specifies that RBOX1 is initially filled with an SCL array named ALPHA.
/* Create the array that fills the radio box */ array alpha $ ('a' 'b' 'c'); /* Create a second array with the same values */ array base $ ('a' 'b' 'c'); /* Each time the radio box is selected, increment the counter */ /* and append the counter value to the base values. */ /* Copy the new value into ALPHA. */ MAIN: counter+1; do i = 1 to dim(alpha); alpha(i) = base(i) || compress (put(counter, 2.)); end; /* Refill RBOX1 with the current values of ALPHA */ call notify('rbox1', '_repopulate_'); return;
When the window opens, the values in the radio box are
a
,
b
,
c
. After the user clicks on a button once, the MAIN section runs, the SCL array ALPHA is updated, and the radio box is repopulated with the new values of ALPHA:
a1
,
b1
,
c1
.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.