NewCtrlMenuSeparator

int NewCtrlMenuSeparator (int panelHandle, int controlID, int beforeMenuItemID);

Purpose

Inserts a new separator bar in the menu owned by the specified control and returns the new menu item ID that you can use in subsequent calls to specify the separator.

Only table and tree controls own menus.

Parameters

Input
Name Type Description
panelHandle integer Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID integer The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
beforeMenuItemID integer Menu item ID above which to insert the separator bar.

The menu item ID is returned by the NewCtrlMenuItem function, by the NewCtrlMenuSeparator function, or is a constant identifying one of the built-in control menu items. The following lists the built-in menu item constants.

Constant Name Constant Value Control Type
VAL_GOTO –2 Table
VAL_SEARCH –3 Table, Tree
VAL_SORT –4 Table, Tree
VAL_EXPAND_SUBTREE –5 Tree
VAL_COLLAPSE_SUBTREE –6 Tree
VAL_EXPAND_ALL –7 Tree
VAL_COLLAPSE_ALL –8 Tree
To place the separator at the bottom of the menu item list, pass –1.

Return Value

Name Type Description
menuItemID integer Returns the ID that you use to specify this menu item in subsequent function calls. Negative values indicate that an error occurred. Zero is not a valid ID.

Code Error Message String
xx (Menu item ID) Success