TE Edit Control Java / HTML-JavaScript Help
Product page

TerMenuEnable

Get menu item 'enable' status

int TerMenuEnable( MenuId)
boolean TerMenuEnable2( MenuId)
int MenuId; menu id. Please refer to the 'command' property for a list of menu (or command) ids.

Description: If your program creates a menu outside the editor window, you can use this function to test if a menu item should be enabled or grayed.

Return Value: The TerMenuEnable function returns one of the following constants:

MF_ENABLED = Enable menu item

MF_GRAYED = Gray out the menu item

The TerMenuEnable2 function returns true when a menu item is enabled. Otherwise it returns a false value.

Example:

boolean status;

status = tej.TerMenuEnable2(tej.ID_CUT);

// The 'status' variable will be true if a text block is highlighted to be copied to the clipboard.