Displaying a menu as a ribbon bar

Using RibbonView

If you have a menu in the MDI or MDIHelp window, you can change its display from the menu style to the ribbon bar style, with just a few clicks.

This feature is called RibbonView; it

  • Uses the menu and window properties to control the appearance of the ribbon bar.

  • Automatically displays menu items as their corresponding ribbon items.

  • Retains the menu's original functionality and event handling without requiring any code changes.

  • Maintains the menu structure, including the grouping of menu items, and programmatic adjustments.

It is easy to set RibbonView, in three simple steps:

  1. Step 1: Enable the DisplayMenuAsRibbonBar property in the window.

  2. Step 2: (Optional) Configure the menu and window properties to customize the appearance of the ribbon bar (including button size/image, panel text/image, sheet list etc.) (or just use the default settings).

  3. Step 3: Run the application from the IDE.

    The menu is now displayed as the ribbon bar; and the menu properties, functions, and events are supported in the ribbon bar without needing to make any code changes.

    • Menu items are automatically displayed as the corresponding ribbon items; and the menu structure including the grouping of menu items remain the same as before.

      • Up to 4 levels of menus can be automatically displayed in RibbonView.

      • The 1st-level menu items will display as ribbon categories.

      • The 2nd-level menu items will display as ribbon buttons, and the buttons will be grouped and placed into panels according to the menu separator line.

      • If the 2nd-level menu has sub-menus (3rd-level menus), the 3rd-level menu will display as a ribbon menu (which is a dropdown menu).

      • If the 3rd-level menu has sub-menus (4th-level menus), the 4th-level menu will display as sub-menu of the ribbon menu.

    • The toolbar, if any, will display as a quick access toolbar above the category by default.

      • Multiple toolbars will be merged and displayed in one quick access toolbar, separating by double vertical lines automatically.

      • Toolbar properties (with a few exceptions) will be supported by the quick access toolbar.

    • If a sheet list is available, a panel will be added and a SheetList button with a dropdown menu that contains a list of opened sheets will be added to that panel.

    • Properties set in the menu (statically and dynamically) will be synchronized and reflected in the ribbon bar.

    • Functions and events of the menu, as well as the corresponding scripts, will be executed in the ribbon bar.

    • The font face and font size will stay the same as the menu. If it is a traditional-style menu which has no font settings, the default font face and size will be used, which is Tahoma 12.

    • If it is a contemporary-style menu which has MenuImage property, the images will be displayed in the ribbon bar (you can also specify to use different images in the RibbonView tab).

    The maintenance and updates of the menu will be automatically reflected and executed in RibbonView (which means you can maintain and update the menu in exactly the same way as before).

For more information, refer to the section called “Using RibbonView” in Users Guide.

Using RibbonBar Converter

If you want to have in-depth customization and maximum control over the ribbon bar, you can use the RibbonBar Converter feature to first export the menu to RibbonBar XML and then customize the XML directly or via scripts. After that, you can replace the menu with the customized RibbonBar.

For more information, refer to the section called “Using RibbonBar Converter” in Users Guide.