DataGridViewRow.Paint Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Paints the current row.
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
The Graphics used to paint the DataGridViewRow.
- clipBounds
- Rectangle
A Rectangle that represents the area of the DataGridView that needs to be painted.
- rowBounds
- Rectangle
A Rectangle that contains the bounds of the DataGridViewRow that is being painted.
- rowIndex
- Int32
The row index of the cell that is being painted.
- rowState
- DataGridViewElementStates
A bitwise combination of DataGridViewElementStates values that specifies the state of the row.
- isFirstDisplayedRow
- Boolean
true
to indicate whether the current row is the first row displayed in the DataGridView; otherwise, false
.
- isLastVisibleRow
- Boolean
true
to indicate whether the current row is the last row in the DataGridView that has the Visible property set to true
; otherwise, false
.
The row has not been added to a DataGridView control.
-or-
The row is in a DataGridView control and is a shared row.
The row is in a DataGridView control and rowIndex
is less than zero or greater than the number of rows in the control minus one.
The DataGridView control calls this method to paint the row.
Calling this method raises the DataGridView.RowPrePaint event. If a handler for the event does not set the HandledEventArgs.Handled property to true
, this method also calls the PaintHeader and PaintCells methods and raises the DataGridView.RowPostPaint event.
Termék | Verziók |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
- DataGridView
- RowPrePaint
- RowPostPaint
- PaintHeader(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts)
- PaintCells(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts)
- Best Practices for Scaling the Windows Forms DataGridView Control
.NET-visszajelzés
A(z) .NET egy nyílt forráskód projekt. Visszajelzés adásához válasszon egy hivatkozást: