dotnetmonitor.com |
|
||||||||||||
| Use draw from custom ToolStrip handler which is
the entry point into Renderer code. OnRender* will be called as a result. To change
Renderer behavior, override OnRender*.
public class MyLabel : ToolStripLabel{ protected override void OnPaint(PaintEventArgs e) {
// Advantage here is that youd get free disabled image support this.Parent.Renderer.DrawItemImage(new ToolStripItemImageRenderEventArgs(e.Graphics, this, this.Image, this.Bounds));
} } |
||||||||||||
|
||||||||||||