Amos Professional Manual  Contents  Index

AMOS Interface


These buttons can be read in several ways. If the RUn command has been used in the program the button value that has been selected will be returned immediately by a DIALOG BOX or DIALOG RUN command. Alternatively, a background dialogue box can have its buttons read directly from an AMOS Professional main program, which is explained later.

Here are the BUtton command parameters, in order:

After the BUtton instruction, the number of the button is specified, from 1 upwards. If several buttons are to be linked together, they can be assigned the same number without causing any problems at all. Each button can be individually tested by the RDIALOG function in an AMOS Professional main program.

The x,y coordinates hold the position of the button, relative to the BAse setting of the dialogue box.

The width and height parameters determine the size of the rectangular test zone that is to enclose the new button, and are given in pixels as usual.

Setting refers to an initial value setting for the new button, starting from zero. This indicates the actual appearance of the position of the button on screen. In the case of a simple ON/OFF button, a value of zero could indicate OFF, while 1 would indicate an ON setting. Normally, the value of this setting will increase by one every time the button is "clicked", but this may be changed directly, within your new button definition.

The minimum and maximum parameters are used to set the range of the allowable button settings. If the button exceeds the maximum limit, it is automatically set back to the minimum setting.

After these parameters have been specified, you are ready to draw the button on the screen. This is defined using a simple list of Interface commands enclosed in square brackets. These instructions can feature anything, including any of the Interface graphics operations. The semi- colon in front of the first square bracket is essential!

The drawing routine is first called when the button is initialised, and it is performed again every time the button is activated by the user.

At the beginning of the routine, the coordinate base is moved to the specified x,y position, and the Size is set to the specified width and height. So all drawing operations are relative to the start position of the current button. This means that there is no need to know the final location of the button on the screen, so the button may be moved around by simply changing the original coordinate values in x,y. The same drawing routines can also be used for several different buttons.

There is a second set of square brackets, which can remain empty, or contain optional commands. These are used to define any "change" routine, to be called every time the button is released.

Back    Next
09.01.10