ערוך

שתף באמצעות


DataGridTextBoxColumn.PaintText Method

Definition

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

g
Graphics

A Graphics object used to draw the string.

bounds
Rectangle

A Rectangle which contains the boundary data of the rectangle.

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

g
Graphics

A Graphics object used to draw the string.

textBounds
Rectangle

A Rectangle which contains the boundary data of the rectangle.

text
String

The string to be drawn to the screen.

backBrush
Brush

A Brush that determines the rectangle's background color.

foreBrush
Brush

A Brush that determines the rectangles foreground color.

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