protected override void OnRenderLabelBackground(System.Windows.Forms.ToolStripItemRenderEventArgs e) { if (currentRenderer != null) { currentRenderer.DrawLabelBackground(e); return; } base.OnRenderLabelBackground(e); }
protected override void OnRenderLabelBackground(ToolStripItemRenderEventArgs e) { if (_currentRenderer != null) { _currentRenderer.DrawLabelBackground(e); } else { base.OnRenderLabelBackground(e); } }
protected override void OnPaint(PaintEventArgs e) { if (base.Owner != null) { ToolStripRenderer renderer = base.Renderer; renderer.DrawLabelBackground(new ToolStripItemRenderEventArgs(e.Graphics, this)); if ((this.DisplayStyle & ToolStripItemDisplayStyle.Image) == ToolStripItemDisplayStyle.Image) { renderer.DrawItemImage(new ToolStripItemImageRenderEventArgs(e.Graphics, this, base.InternalLayout.ImageRectangle)); } this.PaintText(e.Graphics); } }
/// <summary> /// Inheriting classes should override this method to handle this event. /// </summary> protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { if (Owner != null) { ToolStripRenderer renderer = Renderer; renderer.DrawLabelBackground(new ToolStripItemRenderEventArgs(e.Graphics, this)); if ((DisplayStyle & ToolStripItemDisplayStyle.Image) == ToolStripItemDisplayStyle.Image) { renderer.DrawItemImage(new ToolStripItemImageRenderEventArgs(e.Graphics, this, InternalLayout.ImageRectangle)); } PaintText(e.Graphics); } }
protected override void OnRenderLabelBackground(ToolStripItemRenderEventArgs e) { renderer.DrawLabelBackground(e); }