Menu Methods

The methods listed below manipulate a menu connected to the dialog.

ConnectMenuItem

>>-aBaseDialog~ConnectMenuItem(--id--,--msgToRaise--)---------><


The ConnectMenuItem method is called to connect a menu item selection with a method.

Arguments:

The arguments are:

id

The ID of the menu item.

msgToRaise

The name of the method that is to be called.

Example:

See ConnectButton.

Do not use one of the menu item methods below, prior to the SetMenu method. If you call one of these methods before SetMenu has been called, the intended action will not be processed and the return code is unpredictable.

EnableMenuItem

>>-aBaseDialog~EnableMenuItem(--id--)-------------------------><


The EnableMenuItem method is called to enable a menu item.

Arguments:

The only argument is:

id

The ID of the menu item to be enabled.

DisableMenuItem

>>-aBaseDialog~DisableMenuItem(--id--)------------------------><


The DisableMenuItem method is called to disable a menu item.

Arguments:

The only argument is:

id

The ID of the menu item to be disabled.

CheckMenuItem

>>-aBaseDialog~CheckMenuItem(--id--)--------------------------><


The CheckMenuItem method is called to set the check mark for a menu item.

Arguments:

The only argument is:

id

The ID of the menu item to be checked.

UncheckMenuItem

>>-aBaseDialog~UncheckMenuItem(--id--)------------------------><


The UncheckMenuItem method is called to remove the check mark from a menu item.

Arguments:

The only argument is:

id

The ID of the menu item to be unchecked.

GrayMenuItem

>>-aBaseDialog~GrayMenuItem(--id--)---------------------------><


The GrayMenuItem method is called to disable a menu item. The menu item is grayed.

EnableMenuItem is used to reset the grayed state.

Arguments:

The only argument is:

id

The ID of the menu item to be grayed.

SetMenuItemRadio

>>-aBaseDialog~SetMenuItemRadio(--idstart--,--idend--,--idset--)><


The SetMenuItemRadio method is used to change the selection for a radio button menu group.

Arguments:

The arguments are:

idstart

The ID of the first menu item in the group.

idend

The ID of the last menu item in the group.

idset

The ID of the menu item that is to be selected.

Example:

The following example shows how to change the selection within a radio button group. Menu item 102 gets the radio button.

self~SetMenuItemRadio(101, 105, 102)

GetMenuItemState

>>-aBaseDialog~GetMenuItemState(--id--)-----------------------><


The GetMenuItemState method returns the state of a given menu item

Arguments:

The only argument is:

id

The ID of the menu item whose state is of interest.

Return values:

CHECKED DISABLED GRAYED HIGHLIGHTED