ToolStripRenderer.DrawItemText(ToolStripItemTextRenderEventArgs) ToolStripRenderer.DrawItemText(ToolStripItemTextRenderEventArgs) ToolStripRenderer.DrawItemText(ToolStripItemTextRenderEventArgs) ToolStripRenderer.DrawItemText(ToolStripItemTextRenderEventArgs) Method

定义

ToolStripItem 上绘制文本。Draws text on a ToolStripItem.

public:
 void DrawItemText(System::Windows::Forms::ToolStripItemTextRenderEventArgs ^ e);
public void DrawItemText (System.Windows.Forms.ToolStripItemTextRenderEventArgs e);
member this.DrawItemText : System.Windows.Forms.ToolStripItemTextRenderEventArgs -> unit
Public Sub DrawItemText (e As ToolStripItemTextRenderEventArgs)

参数

注解

方法为的文本ToolStripItem提供呈现代码的入口点。 DrawItemTextThe DrawItemText method provides the entry point to the rendering code for the text of a ToolStripItem. 当重写ToolStripItem.OnPaint方法时, 使用此方法绘制项文本, 或强制在自定义ToolStripRenderer中绘制项文本。Use this method to draw the item text when overriding the ToolStripItem.OnPaint method, or to force the item text to be drawn in a custom ToolStripRenderer. 若要更改项文本的呈现方式, 请重写OnRenderItemText派生自ToolStripRenderer的类中的方法。To change the way the item text is rendered, override the OnRenderItemText method in a class derived from ToolStripRenderer.

适用于