Ribbon Style Menu

Ribbon Style Menu is a replacement for the PowerBuilder menu. It gives users a ribbon style UI.
With a few tweaks to your PB menu you can:

  • Group relevant functions into tabs.
  • Expose more functionality to your users.
  • Move common functions to the Program Tab menu.
  • Organize your menu items with large and small icons or use a drop down menu.
  • Add frequently used functions to a quick access toolbar.
  • Allow users to collapse ribbon to maximize screen size.


Implementation

Application setup:

  • Add advguicontrols.pbl and advguiobjects.pbl to your library list.
  • Backup your main menu.
  • Your main window\frame should inherit from w_ribbonwindow.
  • Resize your main windows content using WorkSpaceY(),WorkSpaceX(), WorkSpaceHeight() and WorkSpaceWidth().

Now to configure your menu. All top level menu items will display as tabs in the ribbon. If you don't want one to, make it invisible.

  • Make sure all your menu items have images (toolbar image). For large items, you want good quality 32x32 images.
  • Add your menu items to groups. Make sure the menu Tag property contains "group:MyGroupName;".
    • Copy this tag value to all the menu items you want to appear in that group.
    • Groups are ordered in the same order that they are found when scanning the menu
    • It may be necessary to move items from one top level menu to another. For example, to display Cut, Copy and Paste in the File tab, you will have to move them from the Edit menu to the File menu.
  • If you want the menu item to display in the Quick Access toolbar, add this to your menu's tag: quickaccess:TRUE;
    • E.g. group:MyGroupName;quickaccess:true;
  • If you want the menu item to display as a large item, add this to your menu's tag: size:Large;
    • E.g. group:MyGroupName;size:Large;
  • If you don't want to display text, add this to your menu's tag: displaytext:false;
    • E.g. group:MyGroupName;displaytext:false;
    • E.g. group:MyGroupName;size:Large;displaytext:false;
  • Menu items are ordered in the same order that they are found when scanning the menu.
  • Menu items with sub items are displayed as a group item in the ribbon. An arrow will display next to the text.
    • Note, there is no need to add value to the tags of sub items.
  • If you want to display an image in the top level tab, add an image to your top level menu.
  • If you want more information to display in the tooltip for the menu, add text to the menu items MicroHelp property.
  • You can display the quick access toolbar under your ribbon by checking the DisplayQuickAccesUnderRibbon property on your window.