DataGridViewRow.Paint メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
現在の行を塗りつぶします。
protected public:
virtual void Paint(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle rowBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow);
protected internal virtual void Paint(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle rowBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates rowState, bool isFirstDisplayedRow, bool isLastVisibleRow);
abstract member Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool -> unit
override this.Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * bool * bool -> unit
Protected Friend Overridable Sub Paint (graphics As Graphics, clipBounds As Rectangle, rowBounds As Rectangle, rowIndex As Integer, rowState As DataGridViewElementStates, isFirstDisplayedRow As Boolean, isLastVisibleRow As Boolean)
パラメーター
- graphics
- Graphics
DataGridViewRowの描画に使用するGraphics。
- clipBounds
- Rectangle
塗りつぶす必要があるDataGridViewの領域を表すRectangle。
- rowBounds
- Rectangle
描画中のDataGridViewRowの境界を含むRectangle。
- rowIndex
- Int32
描画中のセルの行インデックス。
- rowState
- DataGridViewElementStates
行の状態を指定する DataGridViewElementStates 値のビットごとの組み合わせ。
- isFirstDisplayedRow
- Boolean
- isLastVisibleRow
- Boolean
true現在の行が、Visible プロパティが true に設定されているDataGridViewの最後の行であるかどうかを示す場合は >。それ以外の場合はfalse。
例外
行が DataGridView コントロール内にあり、 rowIndex が 0 未満か、コントロール内の行数から 1 を引いた数より大きい値です。
注釈
DataGridView コントロールは、このメソッドを呼び出して行を描画します。
このメソッドを呼び出すと、 DataGridView.RowPrePaint イベントが発生します。 イベントのハンドラーが HandledEventArgs.Handled プロパティを true に設定していない場合、このメソッドは PaintHeader メソッドと PaintCells メソッドも呼び出し、 DataGridView.RowPostPaint イベントを発生させます。
適用対象
こちらもご覧ください
- DataGridView
- RowPrePaint
- RowPostPaint
- PaintHeader(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts)
- PaintCells(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts)
- Windows フォーム DataGridView コントロールのスケーリングに関するベスト プラクティス