共用方式為


ToolStripItemTextRenderEventArgs 建構函式

定義

初始化 ToolStripItemTextRenderEventArgs 類別的新執行個體。

多載

ToolStripItemTextRenderEventArgs(Graphics, ToolStripItem, String, Rectangle, Color, Font, ContentAlignment)

使用指定的文字和文字屬性,初始化 ToolStripItemTextRenderEventArgs 類別的新執行個體。

ToolStripItemTextRenderEventArgs(Graphics, ToolStripItem, String, Rectangle, Color, Font, TextFormatFlags)

使用指定的文字和文字屬性格式,初始化 ToolStripItemTextRenderEventArgs 類別的新執行個體。

ToolStripItemTextRenderEventArgs(Graphics, ToolStripItem, String, Rectangle, Color, Font, ContentAlignment)

使用指定的文字和文字屬性,初始化 ToolStripItemTextRenderEventArgs 類別的新執行個體。

public:
 ToolStripItemTextRenderEventArgs(System::Drawing::Graphics ^ g, System::Windows::Forms::ToolStripItem ^ item, System::String ^ text, System::Drawing::Rectangle textRectangle, System::Drawing::Color textColor, System::Drawing::Font ^ textFont, System::Drawing::ContentAlignment textAlign);
public ToolStripItemTextRenderEventArgs (System.Drawing.Graphics g, System.Windows.Forms.ToolStripItem item, string text, System.Drawing.Rectangle textRectangle, System.Drawing.Color textColor, System.Drawing.Font textFont, System.Drawing.ContentAlignment textAlign);
public ToolStripItemTextRenderEventArgs (System.Drawing.Graphics g, System.Windows.Forms.ToolStripItem item, string? text, System.Drawing.Rectangle textRectangle, System.Drawing.Color textColor, System.Drawing.Font? textFont, System.Drawing.ContentAlignment textAlign);
new System.Windows.Forms.ToolStripItemTextRenderEventArgs : System.Drawing.Graphics * System.Windows.Forms.ToolStripItem * string * System.Drawing.Rectangle * System.Drawing.Color * System.Drawing.Font * System.Drawing.ContentAlignment -> System.Windows.Forms.ToolStripItemTextRenderEventArgs
Public Sub New (g As Graphics, item As ToolStripItem, text As String, textRectangle As Rectangle, textColor As Color, textFont As Font, textAlign As ContentAlignment)

參數

g
Graphics

繪製文字所用的 Graphics

item
ToolStripItem

要在其上繪製文字的 ToolStripItem

text
String

要繪製的文字。

textRectangle
Rectangle

Rectangle,表示要在其中繪製文字的範圍。

textColor
Color

繪製文字所用的 Color

textFont
Font

繪製文字所用的 Font

textAlign
ContentAlignment

ContentAlignment,指定周圍區域中文字的垂直和水平對齊方式。

適用於

ToolStripItemTextRenderEventArgs(Graphics, ToolStripItem, String, Rectangle, Color, Font, TextFormatFlags)

使用指定的文字和文字屬性格式,初始化 ToolStripItemTextRenderEventArgs 類別的新執行個體。

public:
 ToolStripItemTextRenderEventArgs(System::Drawing::Graphics ^ g, System::Windows::Forms::ToolStripItem ^ item, System::String ^ text, System::Drawing::Rectangle textRectangle, System::Drawing::Color textColor, System::Drawing::Font ^ textFont, System::Windows::Forms::TextFormatFlags format);
public ToolStripItemTextRenderEventArgs (System.Drawing.Graphics g, System.Windows.Forms.ToolStripItem item, string text, System.Drawing.Rectangle textRectangle, System.Drawing.Color textColor, System.Drawing.Font textFont, System.Windows.Forms.TextFormatFlags format);
public ToolStripItemTextRenderEventArgs (System.Drawing.Graphics g, System.Windows.Forms.ToolStripItem item, string? text, System.Drawing.Rectangle textRectangle, System.Drawing.Color textColor, System.Drawing.Font? textFont, System.Windows.Forms.TextFormatFlags format);
new System.Windows.Forms.ToolStripItemTextRenderEventArgs : System.Drawing.Graphics * System.Windows.Forms.ToolStripItem * string * System.Drawing.Rectangle * System.Drawing.Color * System.Drawing.Font * System.Windows.Forms.TextFormatFlags -> System.Windows.Forms.ToolStripItemTextRenderEventArgs
Public Sub New (g As Graphics, item As ToolStripItem, text As String, textRectangle As Rectangle, textColor As Color, textFont As Font, format As TextFormatFlags)

參數

g
Graphics

繪製文字所用的 Graphics

item
ToolStripItem

要在其上繪製文字的 ToolStripItem

text
String

要繪製的文字。

textRectangle
Rectangle

Rectangle,表示要在其中繪製文字的範圍。

textColor
Color

繪製文字所用的 Color

textFont
Font

繪製文字所用的 Font

format
TextFormatFlags

文字字串的顯示和配置資訊。

適用於