This project is read-only.

Implementing a new header

Aug 8, 2014 at 11:27 AM
Edited Aug 8, 2014 at 11:31 AM

Suppose I want to use a Ribbon Control with an application. What would be a way to get started, taking into account that a ribbon is made of tabs, panels and objects (buttons, textboxes, labels etc.). How would this fit in to the HeaderControl structure (menubars, simpleactionitems, etc)?

Reading through the comments in HeaderControls code, It seems it was meant to take the ribbon structure into account, so maybe someone could give a brief explanation on the basic steps to implement one? I want to try to make an extension that would replace the stardard toolbar with a ribbon.


Aug 11, 2014 at 12:50 PM
After 1 day of work I could do it, following AppManagerCustomizationRuntime example.
I created an extension of HeaderControl, overriding the virtual functions Add( RootItem item) to make it add a RibbonTab, Add(MenuItemcontainer item) to add RibbonPanels, and Add(SimpleActionItem item) to add items into the panels. I had to include some code to handle the case in which a SimpleActionItem doesn't have a MenuItemContainer. In that case, the SimpleActionItem is stored in a "Standard" Panel, available for each RootItem.

This corresponds to treat Tabs as RootItems, Panels as MenuItemsContainer and SimpleActionItems as objects. When used with the standard controls, the result look like the following:


Marked as answer by jany_ on 9/9/2014 at 1:26 AM