DataGridViewRowPrePaintEventArgs 建構函式

定義

初始化 DataGridViewRowPrePaintEventArgs 類別的新執行個體。

public:
 DataGridViewRowPrePaintEventArgs(System::Windows::Forms::DataGridView ^ dataGridView, System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle rowBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates rowState, System::String ^ errorText, System::Windows::Forms::DataGridViewCellStyle ^ inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow);
public DataGridViewRowPrePaintEventArgs (System.Windows.Forms.DataGridView dataGridView, System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle rowBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates rowState, string errorText, System.Windows.Forms.DataGridViewCellStyle inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow);
public DataGridViewRowPrePaintEventArgs (System.Windows.Forms.DataGridView dataGridView, System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle rowBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates rowState, string? errorText, System.Windows.Forms.DataGridViewCellStyle inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow);
new System.Windows.Forms.DataGridViewRowPrePaintEventArgs : System.Windows.Forms.DataGridView * System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * string * System.Windows.Forms.DataGridViewCellStyle * bool * bool -> System.Windows.Forms.DataGridViewRowPrePaintEventArgs
Public Sub New (dataGridView As DataGridView, graphics As Graphics, clipBounds As Rectangle, rowBounds As Rectangle, rowIndex As Integer, rowState As DataGridViewElementStates, errorText As String, inheritedRowStyle As DataGridViewCellStyle, isFirstDisplayedRow As Boolean, isLastVisibleRow As Boolean)

參數

dataGridView
DataGridView

擁有正在繪製之資料列的 DataGridView

graphics
Graphics

用來繪製 DataGridViewRowGraphics

clipBounds
Rectangle

Rectangle,表示需要繪製的 DataGridView 區域。

rowBounds
Rectangle

Rectangle,包含要繪製 DataGridViewRow 的界限。

rowIndex
Int32

正在繪製的儲存格資料列索引。

rowState
DataGridViewElementStates

DataGridViewElementStates 值的位元組合,指定資料列的狀態。

errorText
String

與資料列關聯的錯誤訊息。

inheritedRowStyle
DataGridViewCellStyle

包含有關資料列格式化和樣式資訊的 DataGridViewCellStyle

isFirstDisplayedRow
Boolean

若要表示目前的資料列是否為目前 DataGridView 中所顯示的第一個資料列,則為 true,否則為 false

isLastVisibleRow
Boolean

true 表示目前的資料列是否為將 DataGridView 屬性設為 trueVisible 中的最後一個資料列,否則為 false

例外狀況

dataGridViewnull

-或- graphicsnull

-或- inheritedRowStylenull

適用於

另請參閱