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