指定した位置に、テキストと四角形を指定した色と配置で描画します。
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(Graphicsg,RectangletextBounds,stringtext,BrushbackBrush,BrushforeBrush,boolalignToRight);
[C++]
protected: void PaintText(Graphics* g,RectangletextBounds,String* text,Brush* backBrush,Brush* foreBrush,boolalignToRight);
[JScript]
protected function PaintText(
g : Graphics,textBounds : Rectangle,text : String,backBrush : Brush,foreBrush : Brush,alignToRight : Boolean);
パラメータ
- g
文字列の描画に使用する Graphics オブジェクト。 - textBounds
四角形の境界データを格納している Rectangle 。 - text
画面に描画する文字列。 - backBrush
四角形の背景色を決定する Brush 。 - foreBrush
四角形の前景色を決定する Brush 。 - alignToRight
テキストを右揃えにするかどうかを指定する値。
解説
PaintText メソッドは、画面に値を描画する前に、 Format プロパティを使用して、その値の書式を指定します。
Paint メソッドは PaintText メソッドを呼び出します。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
DataGridTextBoxColumn クラス | DataGridTextBoxColumn メンバ | System.Windows.Forms 名前空間 | DataGridTextBoxColumn.PaintText オーバーロードの一覧 | Format | Paint