NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGridTextBoxColumn.PaintText (Graphics, Rectangle, String, Brush, Brush, Boolean)

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

[Visual Basic]
Overloads Protected Sub PaintText( _
   ByVal g As Graphics, _
   ByVal textBounds As Rectangle, _
   ByVal text As String, _
   ByVal backBrush As Brush, _
   ByVal foreBrush As Brush, _
   ByVal alignToRight As Boolean _
)
[C#]
protected void PaintText(
   Graphics g,
   Rectangle textBounds,
   string text,
   Brush backBrush,
   Brush foreBrush,
   bool alignToRight
);
[C++]
protected: void PaintText(
   Graphics* g,
   Rectangle textBounds,
   String* text,
   Brush* backBrush,
   Brush* foreBrush,
   bool alignToRight
);
[JScript]
protected function PaintText(
   g : Graphics,
   textBounds : Rectangle,
   text : String,
   backBrush : Brush,
   foreBrush : Brush,
   alignToRight : Boolean
);

Parameters

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

Remarks

The PaintText method uses the 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

DataGridTextBoxColumn Class | DataGridTextBoxColumn Members | System.WinForms Namespace | DataGridTextBoxColumn.PaintText Overload List | Format | Format | Paint