DataGridViewRow.PaintCells(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts) DataGridViewRow.PaintCells(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts) DataGridViewRow.PaintCells(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts) Method

定義

現在の行内のセルを描画します。Paints the cells in the current row.

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

パラメーター

graphics
Graphics Graphics Graphics

Graphics の描画に使用する DataGridViewRowThe Graphics used to paint the DataGridViewRow.

clipBounds
Rectangle Rectangle Rectangle

描画が必要な DataGridView の領域を表す RectangleA Rectangle that represents the area of the DataGridView that needs to be painted.

rowBounds
Rectangle Rectangle Rectangle

描画される Rectangle の境界が格納された DataGridViewRowA Rectangle that contains the bounds of the DataGridViewRow that is being painted.

rowIndex
Int32 Int32 Int32

描画されるセルの行インデックス。The row index of the cell that is being painted.

rowState
DataGridViewElementStates DataGridViewElementStates DataGridViewElementStates

行の状態を指定する DataGridViewElementStates 値のビットごとの組み合わせ。A bitwise combination of DataGridViewElementStates values that specifies the state of the row.

isFirstDisplayedRow
Boolean Boolean Boolean

現在の行が DataGridView に表示される最初の行かどうかを示す場合は true。それ以外の場合は falsetrue to indicate whether the current row is the first row displayed in the DataGridView; otherwise, false.

isLastVisibleRow
Boolean Boolean Boolean

現在の行が、DataGridView プロパティが true に設定された、Visible の最後の行かどうかを示す場合は true。それ以外の場合は falsetrue to indicate whether the current row is the last row in the DataGridView that has the Visible property set to true; otherwise, false.

paintParts
DataGridViewPaintParts DataGridViewPaintParts DataGridViewPaintParts

描画するセルの部分を示す、DataGridViewPaintParts 値のビットごとの組み合わせ。A bitwise combination of DataGridViewPaintParts values indicating the parts of the cells to paint.

例外

行が DataGridView コントロールに追加されていません。The row has not been added to a DataGridView control.

paintParts が、DataGridViewPaintParts 値の有効なビットごとの組み合わせではありません。paintParts in not a valid bitwise combination of DataGridViewPaintParts values.

注釈

コントロールDataGridViewは、このメソッドを呼び出して、 DataGridView.RowPrePaintイベントのハンドラーがHandledEventArgs.Handledプロパティをにtrue設定する場合を除き、行内のセルを描画します。The DataGridView control calls this method to paint the cells in the row except when a handler for the DataGridView.RowPrePaint event sets the HandledEventArgs.Handled property to true. 詳細については、「Paint」を参照してください。For more information, see Paint.

適用対象

こちらもご覧ください