Chapter Contents |
Previous |
Next |
Scroll Bar: _setValue |
Syntax | |
Details | |
Examples | |
Example 1: Changing the value of the scroll bar | |
Example 2: SCL program behind scroll bar |
Syntax |
CALL NOTIFY (scroll-bar-name, '_setValue', scroll-bar-value); |
Argument | Type | Description |
---|---|---|
scroll-bar-value |
N | specifies the value (thumb position) to assign to the scroll bar |
Details |
_setVALUE is inherited from Widget. The _setValue method assigns only values that fall on or between the scroll bar's minimum and maximum values. For example, if a value is specified that is greater than the scroll bar's maximum value, the _setValue method assigns the maximum value. However, if the value is set directly (via the SCL variable), the value is not adjusted to the scroll bar's range until the FRAME entry is refreshed.
Examples |
_setValue changes the current value of the scroll bar from 1 to 100:
BUTTON: do i=1 to 100; sbar1=i; /* this _set_value_ method produces */ /* the same results as sbar1=i. */ /* call notify('sbar1', */ '_set_value_',i); */ refresh; end; return;
Assume you have a FRAME entry that contains a scroll bar with default minimum and maximum values (min=0, max=100), 3 numeric text entry fields, and a push button. The FRAME entry has the following SCL program:
FIELD1: sbar1=field1; return; FIELD2: call notify('sbar1','_set_value_',field2); return; BUTTON1: return; MAIN: call notify('sbar1','_get_value_',field3); return;
When
200
is entered in FIELD1,
200
is displayed in FIELD3. When
200
is entered in FIELD2,
100
is displayed in FIELD3. When
200
is entered in FIELD1 and the button (BUTTON1) is selected,
100
is displayed in FIELD3.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.