DataGridTextBoxColumn.PaintText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Draws the specified text and surrounding rectangle at the specified location.
Overloads
PaintText(Graphics, Rectangle, String, Boolean) |
Draws the text and rectangle at the given location with the specified alignment. |
PaintText(Graphics, Rectangle, String, Brush, Brush, Boolean) |
Draws the text and rectangle at the specified location with the specified colors and alignment. |
PaintText(Graphics, Rectangle, String, Boolean)
Draws the text and rectangle at the given location with the specified alignment.
protected:
void PaintText(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ text, bool alignToRight);
protected void PaintText (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string text, bool alignToRight);
member this.PaintText : System.Drawing.Graphics * System.Drawing.Rectangle * string * bool -> unit
Protected Sub PaintText (g As Graphics, bounds As Rectangle, text As String, alignToRight As Boolean)
Parameters
- text
- String
The string to be drawn to the screen.
- alignToRight
- Boolean
A value indicating whether the text is right-aligned.
Remarks
The PaintText method uses the DataFormats.Format object set with the Format property to format the value before drawing it to the screen.
The Paint method calls the PaintText method.
See also
Applies to
PaintText(Graphics, Rectangle, String, Brush, Brush, Boolean)
Draws the text and rectangle at the specified location with the specified colors and alignment.
protected:
void PaintText(System::Drawing::Graphics ^ g, System::Drawing::Rectangle textBounds, System::String ^ text, System::Drawing::Brush ^ backBrush, System::Drawing::Brush ^ foreBrush, bool alignToRight);
protected void PaintText (System.Drawing.Graphics g, System.Drawing.Rectangle textBounds, string text, System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush, bool alignToRight);
member this.PaintText : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Brush * System.Drawing.Brush * bool -> unit
Protected Sub PaintText (g As Graphics, textBounds As Rectangle, text As String, backBrush As Brush, foreBrush As Brush, alignToRight As Boolean)
Parameters
- text
- String
The string to be drawn to the screen.
- alignToRight
- Boolean
A value indicating whether the text is right-aligned.
Remarks
The PaintText method uses the Format property to format the value before drawing it to the screen.
The Paint method calls the PaintText method.
See also
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기