MB_ENTRY

Add a menu entry to a new column

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall MB_ENTRY(control, entry, text, [shortcut], [shortcut_text], [quick_select], [justification]
&     [, disabled])

control

The menu control structure. (a)

entry

The name of the menu entry (a maximum of 10 characters). (a)

text

The display text for the entry. (a)

shortcut

(optional) The shortcut key code or D_SUBMENU to place a submenu. (n)

shortcut_text

(optional) The shortcut display text. (This argument is obsolete, though it is still available.) (a)

quick_select

(optional) The quick-select character. (a)

justification

(optional) One of the following justification flags: (n)

0 = Left-justified beneath heading. (default)

1 = Right-justified beneath heading.

2 = Centered beneath heading.

disabled

(optional) The true/false flag that indicates whether or not the entry will be initially disabled. (n)

MB_ENTRY adds a menu entry to a new column. This subroutine is used when building a new menu column at runtime. You can define up to 20 menu entries per menu column.

By defining D_SUBMENU for shortcut, you can cause the menu entry to display a submenu column. (Note that you must also pass the submenu column’s name as the entry argument.) See the MB_COLUMN Discussion for more information.

If quick_select is not specified, the first non-blank character of text will be used as the quick-select character. If disabled is present and non-zero, the entry will initially be disabled on column placement.

To assign a shortcut to the menu entry, pass one of the identifiers defined in inpctl.def as the shortcut argument. For example, to assign the END key as the shortcut on Windows, pass F60_KEY as shortcut. To find out what to pass for a key or key combination, see the comments in inpctl.def, or open the key mapping utility and view the key map that will be used with the application.

The shortcut_text argument is now obsolete. Before version 2.5 of UI Toolkit, menu shortcut text was derived from the keymap.ctl file at script time, and thus also had to be supplied to MB_ENTRY so that it could be included in the column controls. With version 2.5, runtime terminal binding was added to Toolkit. This feature looks up the key code in the key map for the user’s keyboard at runtime, and loads the shortcut text as the column is loaded.

See the MB_BLANK Examples, which use all the “MB_xxx” subroutines.