DataGridViewRow.PaintCells メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridViewRow.PaintCells メソッドの意味・解説 

DataGridViewRow.PaintCells メソッド

メモ : このメソッドは、.NET Framework version 2.0 で新しく追加されたものです。

現在の行内のセルを描画します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Protected Friend Overridable
 Sub PaintCells ( _
    graphics As Graphics, _
    clipBounds As Rectangle, _
    rowBounds As Rectangle, _
    rowIndex As Integer, _
    rowState As DataGridViewElementStates, _
    isFirstDisplayedRow As Boolean, _
    isLastVisibleRow As Boolean, _
    paintParts As DataGridViewPaintParts _
)
Dim graphics As Graphics
Dim clipBounds As Rectangle
Dim rowBounds As Rectangle
Dim rowIndex As Integer
Dim rowState As DataGridViewElementStates
Dim isFirstDisplayedRow As Boolean
Dim isLastVisibleRow As Boolean
Dim paintParts As DataGridViewPaintParts

Me.PaintCells(graphics, clipBounds, rowBounds, rowIndex, rowState,
 isFirstDisplayedRow, isLastVisibleRow, paintParts)
protected internal virtual void PaintCells
 (
    Graphics graphics,
    Rectangle clipBounds,
    Rectangle rowBounds,
    int rowIndex,
    DataGridViewElementStates rowState,
    bool isFirstDisplayedRow,
    bool isLastVisibleRow,
    DataGridViewPaintParts paintParts
)
protected public:
virtual void PaintCells (
    Graphics^ graphics, 
    Rectangle clipBounds, 
    Rectangle rowBounds, 
    int rowIndex, 
    DataGridViewElementStates rowState, 
    bool isFirstDisplayedRow, 
    bool isLastVisibleRow, 
    DataGridViewPaintParts paintParts
)
protected void PaintCells (
    Graphics graphics, 
    Rectangle clipBounds, 
    Rectangle rowBounds, 
    int rowIndex, 
    DataGridViewElementStates rowState, 
    boolean isFirstDisplayedRow, 
    boolean isLastVisibleRow, 
    DataGridViewPaintParts paintParts
)
protected internal function
 PaintCells (
    graphics : Graphics, 
    clipBounds : Rectangle, 
    rowBounds : Rectangle, 
    rowIndex : int, 
    rowState : DataGridViewElementStates, 
    isFirstDisplayedRow : boolean, 
    isLastVisibleRow : boolean, 
    paintParts : DataGridViewPaintParts
)

パラメータ

graphics

DataGridViewRow の描画に使用する Graphics。

clipBounds

描画が必要な DataGridView の領域を表す Rectangle。

rowBounds

描画される DataGridViewRow の境界が格納された Rectangle。

rowIndex

描画されるセルの行インデックス。

rowState

行の状態を指定する DataGridViewElementStates 値のビットごとの組み合わせ。

isFirstDisplayedRow

現在の行が DataGridView に表示される最初の行かどうかを示す場合は true。それ以外の場合は false。

isLastVisibleRow

現在の行が、Visible プロパティが true に設定された、DataGridView の最後の行かどうかを示す場合は true。それ以外の場合は false。

paintParts

描画するセルの部分を示す、DataGridViewPaintParts 値のビットごとの組み合わせ。

例外例外
例外の種類条件

InvalidOperationException

行が DataGridView コントロールに追加されていません。

ArgumentException

paintParts が、DataGridViewPaintParts 値の有効なビットごとの組み合わせではありません。

解説解説

DataGridView.RowPrePaint イベントのハンドラが HandledEventArgs.Handled プロパティを true に設定している場合を除き、DataGridView コントロールは、このメソッドを呼び出して行内のセルを描画します。詳細については、「Paint」を参照してください。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewRow クラス
DataGridViewRow メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridView.RowPrePaint イベント
HandledEventArgs.Handled
Paint



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

DataGridViewRow.PaintCells メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGridViewRow.PaintCells メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS