I have a ribbon in my application, now the items in the ribbon area has increased and because all of them shows images the total width of all the tool items has increased the Ribbon Tool. Because of this, some of the tool items in some groups became small in size (I think to fit into the available area). I want them to keep their original size and want an overflow indicator in the group so that when that overflow indicator is clicked, it shows those other items. I am not being able to do it, and needs your help.
Hello mayank_goyal,
If I understood your requirements right, the behavior you are trying to achieve is possible with the toolbars when the ribbon is hidden. When the ribbon is shown, the groups have two states of showing the tools inside them - all the tools could be visible or all the tools could be fitted in a GroupButton(if there is not enough space for the group to show all the tools, it collapses). The second behavior could be achieved by setting:
ultraToolbarsManager.Ribbon.GroupSettings.CanCollapse = Infragistics.Win.DefaultableBoolean.True;
For an illustrative example of the above said, you could check out the two samples called "WinToolbars Basic Features with the new Scenic Ribbon Style" and "IG Paint with Ribbon in new Scenic Ribbon Style".
These samples could be located in our 'Windows Forms Feature Browser'. If you have this installed(if you have marked 'Samples' when installing Net Advantage), you could run it from 'Start Menu' -> 'All Programs' -> 'Infragistics' -> 'Windows Forms' -> 'Samples' -> 'Samples (local)'. These samples are under the 'Commands and Editors' tab. Another easy method to find them is by typing their names in the 'Search:' field.
Please feel free to let me know if I misunderstood you or if you have any other questions.
I think I tried this but it did not collapse the complete group, but just made some of the tools smaller in size. I will try it again, the other thing is my Ribbon Style is Office 2010 and not Scenic
Hello,
Could you please review the sample that I attached to this post and see if it meets your requirements.
Please feel free to let me know if this is not what you are looking for, if so, I will be glad to assist you.
I checked the sample and I think what you are referring is the following line:
ribbonGroup2.Settings.CanCollapse = Infragistics.Win.DefaultableBoolean.False;
I tried to set it to true but it did not work, my tools are still showing as small and it did not collapse the group. I also tried to set the property mentioned by you in your earlier post for GroupSettings to true, but that also did not help. One thing to note here is that all my tools, groups, tabs etc. are created at run time. I read an xml file and based on data I create Tabs, Groups and Tools.
Thank you for your feedback, I am very glad that you got it working.
Please do not hesitate to contact us if you need any additional assistance.
I could finally get it working. It works only if you set the MinimumSizeOnRibbon to Large and not if that is set to Medium.
The tools have to be of the same size if you want them not to shrink in order to fit in the area. I feel that I misunderstood you here. So let us clear this out please - If there is not enough space for the ribbon to show all the tools, they should be placed in the collapsed group and not to shrink(not any of them). If that is the case I believe that my sample demonstrates this. If you expect another behavior please let me know, I will be happy to assist you further on that matter.
it did not work for me from the samples, can you please post some code that I can refer. When you say that "different tools might be setting different sizes" do u mean that all the tools in the Ribbon or group should be of the same size (Width).
I think, if I understood you right, of course, that my sample reproduces the behavior you are after. If it does not, please inform me. Another thing that could keep you from achieving what you want, might be setting different sizes of the tools or of the images. I will be very glad to assist you further on that matter, so please do not hesitate to contact me again regarding any questions that you have.