DR ON MENU

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR ON MENU (area; method)

ParameterTypeDescription
areaLongint4D Draw area (-1=all areas)
methodStringName of the method to call

Description

The command DR ON MENU executes method each time a menu item is activated, in either the User or Runtime environment. The menu item can also be called by using the DR DO COMMAND command, as long as the menu item is called in method.

The called method returns three parameters:

$1A Long integer containing the ID for the 4D Draw area
$2A Long integer containing the menu item number
$3A Long integer containing the number of the modifier key pressed

The $3 parameter corresponds to one of the following modifier keys (or combination of modifier keys):

MacOSWindows
0No modifierNo modifier
1Command keyCtrl key
2Shift keyShift key
4Option keyAlt key
8Control key

If a combination of modifier keys is pressed, the values are added together and passed as a parameter. For example, a value of 10 indicates that you pressed the Shift and Control keys while selecting a menu item.

Note: If you compile your database, you must declare the $1, $2, and $3 parameters as Long integers in the method executed by DR ON MENU.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next