Amos Professional Manual  Contents  Index

Windows


Like this:

E> Cls: Paper 4 : Wind Open 1,1,1,12,5,1
   Window 1: Print "Clear Off" : Wait 75
   Paper 9 : Clw

Creating slider bars
One of the standard uses of windows is to create interactive slider bars, like the one at the right- hand side of your AMOS Professional Edit Screen.

HSLIDER
instruction: draw a horizontal slider bar
Hslider x1 ,y1 To x2,y2, units, position, length

Horizontal slider bars are set up by giving the HSLIDER command, qualified by the following parameters: the x,y-coordinates of the top left-hand corner of the bar in pixels followed by the x,y-coordinates of the bottom right-hand corner, then the number of individual units that the slider is divided into. Next, you must specify the position of the active slider box or control button from the left-hand end of the slider, measured in the same sized units as the slider divisions. Finally, give the length of the slider control box in these units. The size of each unit is calculated with this formula:

(x2-x1)/number of units

Here is an example:

E> Hslider 10,10 To 100,20,100,20,5
   Hslider 10,50 To 150,100,25,10,10

VSLIDER
instruction: draw a vertical slider
Vslider x1 ,y1 To x2,y2,units,position,length

This works in the same way as Hslider, and sets up vertical slider bars. For a working demonstration, examine the vertical slider in the Editor window, where the number of units into which the slider is divided is set to the number of lines in the current program.

Here is a simpler example:

E> Vslider 10,10 To 20,100,100,20,5
   Vslider 250,0 To 319,199,10,2,6

SET SLIDER
instruction: set fill pattern for slider bar
Set Slider ink1,paper1,outline1,pattern1,ink2,paper2,outline2,pattern2

SET SLIDER is used to set up the colours and patterns used for your slider bars and their control boxes.

Back    Next
05.07.05