We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how do I get the ribbonpanel to resize

Thread ID:





72756 Apr 3,2008 07:50 AM UTC Apr 8,2008 11:09 AM UTC WinForms 1
Tags: Tools
Asked On April 3, 2008 07:50 AM UTC

i have a tab/tabgroup with a panel with a toolstripex with buttons.

my problem is: the names of the buttons on the static area will change according to culture, how do I ensure that the last does not turn into a dropdown if the names are longer than my standardculture?
i want the toolstripex to resize to fit all its buttons if it can do so within the ribbonpanel.

Administrator [Syncfusion]
Replied On April 8, 2008 11:09 AM UTC

Hi Looksharp,

Thanks for the interest in Syncfusion products.

You can calculate the width of each button and set the size of the toolstripex. Please refer the code

snippet that shows how you can calculate and set the size of the toolstripex.

int width = 0;
int tWidth = 0;
int i,j=0;
foreach (ToolStripPanelItem panel in this.toolStripEx1.Items)
foreach (ToolStripButton button in panel.Items)
width += button.Size.Width;
int w = width/panel.Items.Count;
if(panel.RowCount== panel.Items.Count)
tWidth = w;
i = panel.Items.Count/panel.RowCount;
j= panel.Items.Count% panel.RowCount;


tWidth = w*i;
this.toolStripEx1.Size = new Size(tWidth+15 , toolStripEx1.Size.Height);

Please refer the sample in the below link that illustrates the above.

rel='nofollow' href="http://websamples.syncfusion.com/samples/Tools.Windows/41455_1/main.htm">http://websamples.syncfusion.com/samples/Tools.Windows/41455_1/main.htm

Please let me know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon