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

文本字符串的显示和布局信息。

适用于