DataGridViewRow.PaintCells 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
把當前排的牢房塗上顏色。
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
他們Graphics過去用來上色。DataGridViewRow
- clipBounds
- Rectangle
Rectangle A代表需要上色的區域DataGridView。
- rowBounds
- Rectangle
Rectangle A 包含了所繪製的 的界限DataGridViewRow。
- rowIndex
- Int32
就是被繪製的格子的列索引。
- rowState
- DataGridViewElementStates
一個位元組合 DataGridViewElementStates 的值,指定該列的狀態。
- isFirstDisplayedRow
- Boolean
true用以表示當前列是否為顯示在 DataGridView;;否則,。 false
- isLastVisibleRow
- Boolean
true用以表示當前列是否為 中最後一列DataGridView,且性質設定Visible為 true;否則,。 false
- paintParts
- DataGridViewPaintParts
一個位元組合 DataGridViewPaintParts 的值,指示要繪製的儲存格部分。
例外狀況
該列尚未被 DataGridView 加入控制組。
paintParts 在一個無效的位元組合 DataGridViewPaintParts 值中。
備註
DataGridView控制項會呼叫此方法來繪製該列中的儲存格,除非事件的處理器DataGridView.RowPrePaint將屬性設HandledEventArgs.Handled為 true。 如需詳細資訊,請參閱Paint。