TE Edit Control .NET Core / .NET Framework Help
Product page

TerMenuEnable

Get menu item 'enable' status

int TerMenuEnable( MenuId)
bool 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:

bool status;

status = toc.TerMenuEnable2(tc.ID_CUT);

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