I have searched the forum and found a similar post regarding a standard combobox, I was not able to find anything specific to a toolstripcombobox. For the post that I did find:
http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/1ff7ec02-45bb-452c-ae29-347fb7a7ab1e/The only advice given was to take over the painting of the control. For my application, I am trying to control the look of the ToolStrip and Menu bar using a custom renderer and a custom color table and having to take over control of drawing the ToolStripComboBox would certainly be doable, but unfortunately out of all the methods that are available in the renderer to control how the toolstrip is being drawn there is not a method for the ToolStripComboBox, thus the reason for this post. I am hoping that someone will be able to shed
some light on this subject for me and provide a more consistent solution.
I have the following in a project:
- Custom color table derived from ProfessionalColorTable
- Custom renderer derived from ToolStripRenderer
- Custom control derived from ToolStrip to provide "click through" functionality when control does not have focus
- Simple form that has an instance of the custom toolstrip with a single ToolStripComboBox added
So, when I run this application, I see the toolstrip being displayed
using my custom renderer with the color scheme that I have created
(Gunmetal for those interested) for the toolstriip itself (and any normal toolstrip buttons for that matter). However, for the combobox the color scheme and style appear to be generic and some of the pieces do not seem to have any properties exposed to change the color (such as the arrow portion of the control, and I know the arrow is drawn in the background color of the control which you can chage, but the background that the arrow is drawn on is not something that I have been able to change), etc...
So, in trying to maintain consistency in how a given style is controlled, I want to be able to change / effect / modify the appearance of my toolstrip through my renderer and I can accomplish this for all aspects of the toolstrip, except the combobox.
Any insight into this would be appreciated. Having to use multiple methodologies to effect a style change seems to not be the best practice and I woud like to avoid it if at all possible.
Cheers,
creo