Enabling DisplayMenuAsRibbonBar

Currently, the DisplayMenuAsRibbonBar property is only available for MDI and MDIHelp window types.

To enable this property,

  • Navigate to the General tab in the Window control Properties page and select the "DisplayMenuAsRibbonBar (Only for MDI!/MDIHelp!)" property.

  • Or enable the DisplayMenuAsRibbonBar property in the script. For example,

    w_frame_1.displaymenuasribbonbar = true

This property will automatically display the menu on the current MDI/MDIHelp window as a RibbonBar control at runtime. It also enables triggering of the original menu's Clicked events and shortcut keys within the RibbonBar control.

This property also determines that the window MenuChanged event is triggered when the ribbon bar is initialized. The MenuChanged event will by default load the ribbon bar directly from the menu.

Once DisplayMenuAsRibbonBar is enabled, the original menu style will be displayed as the RibbonBar style, including the toolbar which is displayed as QuickAccessToolbar, at the top of the MDI Frame window.

See the default layout below:

Original menu display:

After enabling DisplayMenuAsRibbonBar, the menu display switches to the RibbonBar control display:

If the original menu has a toolbar, a QuickAccessToolbar will be generated. It is a sub-control of the RibbonBar. Its content comes from the toolbar in the original menu. For more information about the QuickAccessToolbar, please refer to section QuickAccessToolbar.

After displaying as a RibbonBar, the RibbonBar occupies more space than the original menu, therefore, the MDI client area is smaller than before. For more information about the window size, please refer to section Window size.

The RibbonBar converted from the menu is a non-visual object called mdirbb_1 by default. For more information about the mdirbb_1 object, please refer to section mdirbb_1 object.