ToolStripItemTextRenderEventArgs 构造函数

定义

初始化 ToolStripItemTextRenderEventArgs 类的新实例。

重载

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

Source:
ToolStripItemTextRenderEventArgs.cs
Source:
ToolStripItemTextRenderEventArgs.cs
Source:
ToolStripItemTextRenderEventArgs.cs
Source:
ToolStripItemTextRenderEventArgs.cs
Source:
ToolStripItemTextRenderEventArgs.cs

使用指定的文本和文本属性初始化类的新实例 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)

Source:
ToolStripItemTextRenderEventArgs.cs
Source:
ToolStripItemTextRenderEventArgs.cs
Source:
ToolStripItemTextRenderEventArgs.cs
Source:
ToolStripItemTextRenderEventArgs.cs
Source:
ToolStripItemTextRenderEventArgs.cs

使用指定的文本和文本属性格式初始化类的新实例 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

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

适用于