System.Windows.Forms.ToolStripRenderer.DrawItemText Method

Draws text on a System.Windows.Forms.ToolStripItem.

Syntax

public void DrawItemText (ToolStripItemTextRenderEventArgs e)

Parameters

e
A System.Windows.Forms.ToolStripItemTextRenderEventArgs that contains the data to draw the text.

Remarks

The ToolStripRenderer.DrawItemText(ToolStripItemTextRenderEventArgs) method provides the entry point to the rendering code for the text of a System.Windows.Forms.ToolStripItem. Use this method to draw the item text when overriding the ToolStripItem.OnPaint(PaintEventArgs) method, or to force the item text to be drawn in a custom System.Windows.Forms.ToolStripRenderer. To change the way the item text is rendered, override the ToolStripRenderer.OnRenderItemText(ToolStripItemTextRenderEventArgs) method in a class derived from System.Windows.Forms.ToolStripRenderer.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0