System.Windows.Forms.DataGridTextBoxColumn.PaintText Method

Draws the text and rectangle at the specified location with the specified colors and alignment.

Syntax

protected void PaintText (System.Drawing.Graphics g, System.Drawing.Rectangle textBounds, string text, System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush, bool alignToRight)

Parameters

g
A System.Drawing.Graphics object used to draw the string.
textBounds
A System.Drawing.Rectangle which contains the boundary data of the rectangle.
text
The string to be drawn to the screen.
backBrush
A System.Drawing.Brush that determines the rectangle's background color
foreBrush
A System.Drawing.Brush that determines the rectangles foreground color.
alignToRight
A value indicating whether the text is right-aligned.

Remarks

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0