I have a toolstrip control inside a custom user-control. The custom user control is used multiple times on the same form. I’m trying to apply a custom gradient to the toolstrip. I can’t add a custom gradient at design time, so I need to do it at some point when the toolstrip is placed on the form during the event cycle.
I can use something like this:
MyToolstrip.Renderer = New ToolStripProfessionalRenderer(New MyInheretedProColorTable)
The problem is, I don’t know where to put it. There are no events that would seem to work for this.
Because I’m using multiple toolstrips (that I want to be different colors), I can’t change the renderer of the ToolstripManager on the whole form because it will change the color of all toolstrips to the same color. This is really odd how MS handles these.
http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstrip_events.aspx
Any ideas? Thanks
The toolstrip gets created in the constructor by the InitializeComponent() call. So that’s where this statement belongs as well, right after that call. Boiler plate code is: