A ToolStripComboBox is placed after a ToolStripButton and is folowed by another one, which is right-aligned. How do I best set up the ToolStripComboBox to always adjust its length to fill all the space available between the preceeding and the folowing ToolStripButtons?
In past I used to handle a parent resize event, calculate the new length to set based on neighboring elements coordinates and setting the new size. But now, as I am developing a new application, I wonder if there is no better way.
There's no automatic layout option for this. But you can easily do it by implementing the ToolStrip.Resize event. This worked well:
Be sure to set the TSCB's AutoResize property to False or it won't work.