Ribbon Bar
"Ribbon" control was introduced by Microsoft in Office 2007. It's not just a new control - it's a new user interface ideology. Ribbon control replaces traditional toolbars and menus with tabbed groups (Categories). Each group is logically split into Panels and each panel may contain various controls and command buttons. In addition, Ribbon control provides smart layout maximally utilizing the available space. For example, if a Panel has been stretched and has no place to display all available controls, it becomes a menu button which can display sub-items on a popup menu. Another great addition is "Floaty" (mini toolbar). Floaty is a semi-transparent toolbar appearing right near the cursor and containing "hot" commands relevant for the current context. Customizable "Quick Access Toolbar" and "Main" button allow instant access to the most important and extensively used commands. BCGControlBar Library provides easy and efficient way to add this new technology to your applications. ClassesThe main class, the Ribbon control itself, is implemented by CBCGPRibbonBar. It behaves as a "static" (non-floating) control bar and can be docked at the top of frame. In fact, the same Ribbon Bar can be used to implement Office 2007-2019-style status bar or any other control that hosts Ribbon Categories (CBCGPRibbonCategory). A Ribbon Category is a logical entity. The visual representation of Category is a Ribbon Tab (CBCGPRibbonTab). A Category contains (and the Tab displays) a group of Ribbon Panels. Each Ribbon Panel contains one or more Ribbon Elements (CBCBPBaseRibbonElement-derived objects) as outlined on the following picture:
The most of Ribbon Elements should have two images - small and large. In some cases when a Ribbon Element has to display an image (it happens if the element has been stretched to the size when it can display image only), but if the image has not been specified the library will use a default internal image. Each Category is assigned its own image list. You can specify an index in this image list for each Element that belongs to Category. CBCGPRibbonButton implements a command button object. Ribbon Buttons can be arranged in Groups (CBCGPRibbonButtonsGroup). Each Group has first and last element. All Group elements are surrounded by a group border. As special kind of Group is the Quick Access Toolbar (CBCGPQuickAccessToolbar). Usually it contains the most important and frequently used commands. User can customize this toolbar. The Ribbon Main Button (CBCGPRibbonMainButton) is a special button located in the left top corner of application window and displays a menu, which usually contains "File" command like Open, Save, Exit. The Ribbon Launch Button (CBCGPRibbonLaunchButton) is a small button located at the right bottom corner of Ribbon Panel. This button can be associated with an additional panel command (for example, it can display a dialog with some options common to the Panel). Ribbon Color Button (CBCGPRibbonColorButton) is a special Ribbon Element (button), which displays a color picker. It extends the Ribbon Button and allows setting additional options for the color picker. Back to topHow to add ribbon control to your application
|
|||||||||
Questions and Answers
Q. How to add a toolbar combo box button to
a panel?
Q. How to add a Quick Launch Button?
Q. How to add to a Pane several groups of
buttons from a toolbar defined in resources?
Q. How to add a group of buttons to a
Panel on the fly?
Q. How to set up Quick Access Toolbar?
Q. How to add elements at the right side
of tabs?
|
|||||||||
Back to the Developer Area |