5.3. Example Menu Added to the Right of the Ribbon Tabs

This menu example covers each of the various menu macros covered in the Adding Menus to the Right of the Ribbon chapter. It is important to note that the Example Menu Option and Example Submenu Option menu items do not open any kind of interface. As you can see in the code, these are just menu items created to illustrate the process of adding menu items to menus and submenus. The MyUDF Dialog Box menu item is functional and will open the Dialog Box Example interface. This menu creation code provides examples of menus and menu items that use a mnemonic (MyUDF Menu, MyUDF Dialog Box) and those that do not, using #f in the place of that argument (Example Menu Item, Example Submenu, Example Submenu Item).


Note:  In order for the MyUDF Dialog Box menu item to show up in the MyUDF Menu, the Dialog Box Example Scheme file must be read into Fluent before this menu creation example code. This is why New Menu also appears in the following graphic.


(cx-add-menu "MyUDF Menu" #\y)
(cx-add-item "MyUDF Menu" "Example Menu Option" #f #f #t #f)
(cx-add-hitem "MyUDF Menu" "Example Submenu" #f)
(cx-add-item "Example Submenu" "Example Submenu Option" #f #f #t #f)
(cx-add-item "MyUDF Menu" "MyUDF Dialog Box" #\x #f #t gui-dialog-box)