Stretch ToolStripEx to fill the ribbon

Is there a way to make a ToolStripEx stratch to fill the ribbon. 
I see that there is a Stretch property that presumably does exactly that, but it has no effect.

5 Replies

VI Vinothini Syncfusion Team October 10, 2017 12:50 PM UTC

Hi Panayotis, 
 
Thank you for contacting Syncfusion support. 
 
ToolstripEx size will be calculated internally to support the collapse behavior of the RibbonControlAdv. If we assign the width of the RibbonControlAdv to the ToolstripEx width on resize, the size for ToolstripEx will not be set because the size is set internally. It is an expected behavior when using ToolstripEx inside RibbonControlAdv. Could you please let us know the purpose for stretching the ToolstripEx, so that we can proceed on this? 
 
Additionally ToolstripEx stretch property is used to fill the ToolstripEx inside the ToolstripContainer. It is base property from Toolstrip, since the ToolstripEx derived from Toolstrip this property will be effective only in ToolstripContainer. Please look into the below link for reference. 
 
 
Regards, 
Vinothini.R 



PK Panayotis Kouvarakis October 11, 2017 09:18 AM UTC

Hi Vinothini,

I was actually trying to have a strip that includes some fixed buttons on the left, a panel with labels and textboxes then another fixed button right aligned. The labels would provide contextual information to the user and the textbox would be used to provide a global search. Obviously I would like these to stretch to fill any available space, after of course all other fixed buttons in the strip had taken their space. For this to work the strip would itself have to stretch to fill any available space on the ribbon/tab (after any other fixed strips have taken their space as well).

You can see similar behaviour in MS Word, where the Styles strip in Home tab stretches to fill the remaining space after every other strip has taken its space in the ribbon (and automatically adjusts as the window/ribbon width changes). Of course in this case the Styles strip hosts only a single gallery tool strip item but that shouldn't make much difference. 


Regards,

Panayotis



VI Vinothini Syncfusion Team October 12, 2017 11:18 AM UTC

Hi Panayotis, 
 
Thank you for your update. 
 
To make the toolstrip stretches with the whole RibbonControlAdv, we have created a workaround. In this workaround, the size of the ToolStripEx is set as the width of the RibbonControlAdv in SizeChanged event and ToolStripEx state changed event.  Please look into the below sample and let us know whether it fulfills your requirement. 
 
 
Regards, 
Vinothini.R 



PK Panayotis Kouvarakis October 13, 2017 07:50 AM UTC

Thank you for your reply and the sample you provided.

While this does stretch the toolstrip as required, it does have a few issues. For one it does not work when there are more than one toolstrips in the tab (other toolstrips have fixed width or autosize to content). Another issue is that the items within the toolstrip will not stretch either (e.g. the toolstrippanel cannot be made to stretch).

All in all, I don't think this will eventually work so my best bet would be to try a different route altogether.

Thank you again for your time.


Kind regards,

Panayotis



VI Vinothini Syncfusion Team October 16, 2017 05:29 AM UTC

Hi Panayotis, 
 
Thank you for your update.  
 
At present there is no support for stretching one or more ToolstripEx along with the ToolstripItems. A support incident has been created to track the status of this issue under your account. Please log on to our support website to check for further updates.  
 
  
Regards,  
Vinothini.R  


Loader.
Up arrow icon