DataGridViewRow.Paint Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Nakreslí aktuální řádek.
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)
Parametry
- graphics
- Graphics
Použité Graphics k malování DataGridViewRow.
- clipBounds
- Rectangle
A Rectangle , který představuje oblast DataGridView , kterou je potřeba malovat.
- rowBounds
- Rectangle
A Rectangle , který obsahuje hranice DataGridViewRow , které jsou malovány.
- rowIndex
- Int32
Index řádku buňky, která se maluje.
- rowState
- DataGridViewElementStates
Bitová kombinace DataGridViewElementStates hodnot, která určuje stav řádku.
- isFirstDisplayedRow
- Boolean
true chcete-li určit, zda je aktuální řádek prvním řádkem zobrazeným v objektu DataGridView; v opačném případě false.
- isLastVisibleRow
- Boolean
true chcete-li určit, zda je aktuální řádek posledním řádkem v objektu DataGridView , který má vlastnost nastavenou Visible na true; jinak , false.
Výjimky
Řádek nebyl přidán do DataGridView ovládacího prvku.
nebo
Řádek je v ovládacím DataGridView prvku a je sdíleným řádkem.
Řádek je v ovládacím DataGridView prvku a rowIndex je menší než nula nebo větší než počet řádků v ovládacím prvku minus jeden.
Poznámky
Ovládací DataGridView prvek volá tuto metodu k vykreslení řádku.
Voláním této metody vyvoláte DataGridView.RowPrePaint událost. Pokud obslužná rutina události nenastaví HandledEventArgs.Handled vlastnost truena , tato metoda také volá PaintHeader a PaintCells metody a vyvolává DataGridView.RowPostPaint událost.
Platí pro
Viz také
- DataGridView
- RowPrePaint
- RowPostPaint
- PaintHeader(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts)
- PaintCells(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Boolean, Boolean, DataGridViewPaintParts)
- Osvědčené postupy pro škálování ovládacího prvku Windows Forms DataGridView