This is a migrated thread and some comments may be shown as answers.

RadRibbonBarGroup

3 Answers 162 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 18 May 2012, 03:54 PM
Hi everyone,

I think that Telerik refers to a RadRibbonBarGroup as a "Chunk," which is contained in a RibbonTab.  I want to use contextual tabgroups as in the example: "RadRibbon/First Look" or something similar to "Windows 7 Paint".  I noticed that many "Chunks" occur in different tabs.

Is there a way to include a single chunk into multiple contextual / tab groups?  I have a color gallery with 30 buttons just like paint which I want to add to others tabs with minimal code. I also want to include a "Clipboard" chunk in several tabs.

What is the easiest way to do this?  Maybe you have a link that I didn't discover?

Thanks!



3 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 23 May 2012, 01:59 PM
Hi Michael,

Thank you for writing.

In the First Look example of RadRibbonBar the Clipboard group exists in both tabs. It is not moved from one to another. However, if you want, you can move it between the tabs, by using the CommandTabSelected event of the control. Attached you can find a sample application demonstrating how to achieve that. 

I hope this helps. Let us know if you have any other questions.

Kind regards,
Stefan
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Michael
Top achievements
Rank 1
answered on 31 May 2012, 10:11 PM
Hi Stefan, 

Thanks for the response and the sample app; it works perfectly. 

I do have a follow up question.  Is there a way to add a group to a tab at a certain position. The add function puts the group at the end. Right now, I clear the tab groups and then use the addRange function to put them in the correct order, but this causes the tab to blank out and flicker to rebuild.

Also, I have been using this link http://www.telerik.com/help/winforms/ to look up documentation which is quite helpful.  What if I want to learn something about some other random method, for example: RibbonTab1.Items.OrderBy()? 

Thanks,
Mike.

0
Nikolay
Telerik team
answered on 05 Jun 2012, 02:16 PM
Hello Michael

You can use the Insert method to add a group at a specific position among other groups:

args.CommandTab.Items.Insert(3, group1);

When using this API make sure that there are enough groups added already, so that the new group can be correctly added at the specified position.

When you want to learn something about a method of ours, you can navigate to our API Reference which is a part of the online documentation. As to the OrderBy method in particular, this is a standard extension method coming from Enumerable and you can read more about it in the MSDN Documentation. Regards,
Nikolay
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
RibbonBar
Asked by
Michael
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Michael
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or