4.2. Adding a New Submenu

This section describes how you can add a new submenu to menus that you have already created.

4.2.1. Description

Using Scheme, you can add submenus to menus you have already defined by using the cx-add-hitem macro.

4.2.2. Usage

(cx-add-hitem menu item mnemonic)

ArgumentTypeDescription
menustringThe name of the menu that you are adding the submenu to
itemstringThe name of the submenu you are adding
mnemoniccharThis is a placeholder. The only mnemonic is Alt + F for the File menu.

Note:  Mnemonics are not available for user-defined menus, however you must still provide a value for this field, for example #f.



Note:  The names of menus and submenus should be unique to avoid conflict when adding menu items. If two menus/submenus of the same name do exist, a menu item being added to that name will be added to the last menu/submenu to be created.


4.2.3. Examples

Since all of the menu macros are best shown and implemented together, see Example Menu Added to the Right of the Ribbon Tabs for examples of menus being added to the right of the Fluent ribbon tabs.