DataGridViewRow.PaintCells メソッド

定義

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

protected public:
 virtual void PaintCells(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle rowBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, System::Windows::Forms::DataGridViewPaintParts paintParts);
protected internal virtual void PaintCells (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle rowBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow, System.Windows.Forms.DataGridViewPaintParts paintParts);
abstract member PaintCells : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool * System.Windows.Forms.DataGridViewPaintParts -> unit
override this.PaintCells : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool * System.Windows.Forms.DataGridViewPaintParts -> unit
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)

パラメーター

graphics
Graphics

DataGridViewRow の描画に使用する Graphics

clipBounds
Rectangle

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

rowBounds
Rectangle

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

rowIndex
Int32

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

rowState
DataGridViewElementStates

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

isFirstDisplayedRow
Boolean

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

isLastVisibleRow
Boolean

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

paintParts
DataGridViewPaintParts

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

例外

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

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

注釈

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

適用対象

こちらもご覧ください