I'm trying to figure out the ToolStripSplitButton. The purpose is to display a usercontrol gauge when a ToolStripSplitButton is pressed. However, no matter what settings I try, there is a grey line visible below the button.
The ToolStrip itself is set to RenderMode.System, is not docked, and the ToolStripSplitButton is the only component in it.
I can remove the line by introducing a custom ToolStripRenderer class, but this seems like a total overkill for removing this single annoying dark grey line under the control.
I realize it might be a total shot in the dark since I don't provide the rest of the gazillion settings for these components, but I was hoping someone could provide insight into why this control is behaving the way it does.
My second question is regarding the behaviour of the ToolStripSplitButton. Is there any way to avoid the flat and borderless look that the component displays before the mouse hovers over it? I'm trying to give it a uniform look along with the rest of the buttons in the panel, and the ToolStripSplitButton only appears raised when the mouse cursor is placed above the component.
Here's a screenshot:
Any help is greatly appreaciated!
For anyone interested, I ended up creating a custom ToolStripRenderer class after all. Here I had to override several methods to get the wanted result, and the result came out pretty nice. To draw the button outline I simply used ControlPaint, and for the dropped-down tab-like look I drew some lines with the ControlDarkDark system color. Not to get into the gory details, there are several tutorials out there describing this already. Now, it does seem weird that to get a button-like behaviour from a ToolStripDropDownButton one has to do the drawing oneself, but I'm not ruling out that a setting might have clashed with another somewhere.
I can post the code if anyone is interested.