Amos Professional Manual  Contents  Index

Menus


Y MENU returns the y-coordinate of a menu option, measured relatively to the previous item on screen. Please refer to the demonstration program above.

Moving a menu within a program

MENU BASE
instruction: move the starting position of a menu
Menu Base x,y

Use this command to move the starting point of the first level in your menu hierarchy to the absolute screen coordinates at x,y. All subordinate menu items will now be displayed relative to this starting point.

SET MENU
instruction: move a menu item
Set Menu(single item parameters) To x,y

SET MENU sets the screen position of the top left-hand corner of the menu item whose parameters are given in brackets. These coordinates are measured relative to the previous level, so the starting point for the entire menu can be set by the MENU BASE command. All levels of the menu below this single item will also be moved by your SET MENU command. The coordinates can be negative as well as positive, so you are free to position items anywhere on screen.

MENU MOUSE ON
MENU MOUSE OFF

instruction: display the menu at position of mouse cursor
Menu Mouse On
Menu Mouse Off

Use these commands to toggle the display of all menus starting from the current position of the mouse cursor. The mouse coordinates are added to the MENU BASE to calculate the menu position, so it is possible to lace a menu at a fixed distance from the mouse pointer.

Keyboard shortcuts
Menus are an extremely useful system of selecting from a clear choice of options. They present the user with a simple method of performing some complex operations, and they are particularly suitable for the less experienced or younger user. But the AMOS Professional programmer can be more concerned with speed rather than simplicity, and menu operations can become a little tedious. This is why you may prefer to choose your options directly from the keyboard.

AMOS Professional allows you to assign a keyboard shortcut to any of your menu items, and these key presses are interpreted as their exact equivalents. They can be used with any menu command, including the ON MENU range.

Back    Next
06.05.11