|  | 
| Grouping Controls on a Ribbon | 
| Post Reply   | 
| Author | |
| Danlar   Groupie     Joined: 27 February 2008 Location: United States Status: Offline Points: 12 |  Post Options  Thanks(0)  Quote  Reply  Topic: Grouping Controls on a Ribbon Posted: 05 May 2008 at 3:58pm | 
| 
   Hello,
 I recently discovered the SetControlsGrouping function on CXTPRibbonGroup. For any unfamiliar readers, this function provides two alternative ways to "group" various controls within a single CXTPRibbonGroup. Here is an example from the RibbonSample of two different groups: The one and on the left has ControlsGrouping set to False, and the one on the right has it set to True.   I noticed a ribbon group in Microsoft Excel 2007 that appears to be combining both of these styles within a single CXTPRibbonGroup. Is it possible with CodeJock to make a ribbon group appear like this one from excel? Note that the right half of this Ribbon Group is denoted with a separator, whereas the left half uses ControlsGrouping. I couldn't find a way to use separators when ControlsGrouping is True.   Here is a mock-up of what we would most like our ribbon group to look like; is this possible? Notice how the far left control appears to be "ungrouped," and we have a separator in there, yet some controls are still "grouped" together (below the left combobox and in the top-right corner).   Thanks, Dan Fike | |
|  | |
| cpehonk   Groupie   Joined: 27 April 2008 Location: Germany Status: Offline Points: 22 |  Post Options  Thanks(0)  Quote  Reply  Posted: 06 May 2008 at 12:56am | 
| 
   Hi Dan,
 did you already try to use "BeginGroup( TRUE)" on the first added control of the "sub-group" ? Didn't try this myself but it might work for you. It works perfectly for inserting separators so far ... Greetings, Chris | |
|  | |
| Danlar   Groupie     Joined: 27 February 2008 Location: United States Status: Offline Points: 12 |  Post Options  Thanks(0)  Quote  Reply  Posted: 06 May 2008 at 10:44am | 
| 
   Consider the following group:
   This group was constructed with the following code: 
 Now, if I change that very last line of code to read as group->SetControlsGrouping(TRUE), the group will look like this instead:   The CXTPControl::SetBeginGroup function has different results if you change the argument to CXTPRibbonGroup::SetControlsGrouping. You don't get separators anymore. I'm trying to find a way to blend both results in a single group, the way Microsoft Excel 2007 appears to be doing it in the screenshot of my previous post. Furthermore, I added calls to CXTPControl::SetStyle to the last two controls in the above code, using xtpButtonIconAndCaption and xtpButtonIconAndCaptionBelow as arguments, and this was the result.   That seems a bit odd. It doesn't seem that CodeJock is capable of making a ribbon group that looks like the Excel image or the desired mock-up in my original post. I'm just looking to confirm this before I move on. -Dan | |
|  | |
| cpehonk   Groupie   Joined: 27 April 2008 Location: Germany Status: Offline Points: 22 |  Post Options  Thanks(0)  Quote  Reply  Posted: 06 May 2008 at 12:51pm | 
| 
   Understood and agreed ...   Maybe this is a job for Oleg again ... Greetings, Chris | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |