ToolStripItemTextRenderEventArgs 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 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)
參數
- item
- ToolStripItem
要在其上繪製文字的 ToolStripItem。
- text
- String
要繪製的文字。
- 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)
參數
- item
- ToolStripItem
要在其上繪製文字的 ToolStripItem。
- text
- String
要繪製的文字。
- format
- TextFormatFlags
文字字串的顯示和配置資訊。