Example: Changing a Widget
|
Step 2: Change Widget Attributes
Since SLIDER was the last widget generated, it appears on top of the METER widget.
To reposition the SLIDER widget and the METER widget, we will modify the program
by adding the positioning attributes "X" and "Y" to each widget so that both widgets are
fully visible. In addition, we will change the SLIDER widget background to green.
A typical display for this modified program follows.
10 ASSIGN @Meter TO WIDGET "METER"
20 ASSIGN @Slider TO WIDGET "SLIDER"
30 CONTROL @Slider;SET ("X":0,"Y":0,"BACKGROUND":4)
40 CONTROL @Meter;SET ("X":150,"BACKGROUND":1)
50 LOOP
60 END LOOP
70 END