Equinox Online Help - Language Reference - A to Z

Home

EnableCommand

Applies to
SyntaxEnableCommand OptionName [, SwitchExpression]
Action[Statement] Enables or disables a form menu option.
ScopeOnly usable in form methods
Notes

This statement enables or disables a menu option on a form. If a menu option is disabled, it appears greyed on the menu. In this state, you cannot select it. Any corresponding accelerator key is also disabled. When a disabled option is enabled, you can use it again as normal.

SwitchExpression is evaluated to either True or False. A value of True enables the option, whereas False disables it. Note that True is equivalent to any non-zero integer and False is equivalent to zero. If you omit SwitchExpression, it defaults to True.

OptionName identifies the menu option. The following table describes the values that OptionName can take and the corresponding form menu option.

OptionName[Menu] option
CloseOption[File] Close
ExitOption[File] Exit
ZoomMemoOption[Edit] Zoom/ Unzoom Memo field
ShowNowOption[Edit] Show Pictures Now
SelectPictureOption[Edit] Select a Picture ...
ClearPictureOption[Edit] Clear a Picture ...
ShowRequestOption[Edit] Show Pictures on Request
ShowDelayOption[Edit] Show Pictures after 5 Seconds
ShowNodelayOption[Edit] Show Pictures Immediately
ChooseGroupOption[Group] Choose ...
PreviousGroupOption[Group] Previous
NextGroupOption[Group] Next
FirstPageOption[Page] First
PreviousPageOption[Page] Previous
NextPageOption[Page] Next
LastPageOption[Page] Last
MovePageOption[Page] Move
SizePageOption[Page] Size
PageVisibilityOption[Page] Visibility ...
RecordFindOption[Record] Find ...
TopRecordOption[Record] Top
PreviousRecordOption[Record] Previous
NextRecordOption[Record] Next
BottomRecordOption[Record] Bottom
InsertRecordOption[Record] Insert
DuplicateRecordOption[Record] Insert Duplicate
EditRecordOption[Record] Edit
DeleteRecordOption[Record] Delete
DefaultIndexOption[Index] Default View Order
SelectIndexOption[Index] Select View Index ...
MarkIndexOption[Index] Select Mark Index ...
MarkRecordOption[Index] Mark Record
UnmarkRecordOption[Index] Unmark Record
BlankIndexOption[Index] Blank Mark Index
UpdateIndexOption[Index] Update Mark Index
PickListOption[Data] Pick from List ...
UserOption[1-64]User defined menu options
CategoryMenus and mouse
See Also MouseObject, MouseObjectName, MousePosition, Trigger
Example

This example disables user access to the delete record menu option.

EnableCommand DeleteRecordOption, false

The next example allows the user to choose a new form group.

EnableCommand ChooseGroupOption