DataGridViewCellPaintingEventArgs Конструктор

Определение

Инициализирует новый экземпляр класса DataGridViewCellPaintingEventArgs.

public:
 DataGridViewCellPaintingEventArgs(System::Windows::Forms::DataGridView ^ dataGridView, System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle cellBounds, int rowIndex, int columnIndex, System::Windows::Forms::DataGridViewElementStates cellState, System::Object ^ value, System::Object ^ formattedValue, System::String ^ errorText, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ advancedBorderStyle, System::Windows::Forms::DataGridViewPaintParts paintParts);
public DataGridViewCellPaintingEventArgs (System.Windows.Forms.DataGridView dataGridView, System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, int columnIndex, System.Windows.Forms.DataGridViewElementStates cellState, object value, object formattedValue, string errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);
public DataGridViewCellPaintingEventArgs (System.Windows.Forms.DataGridView dataGridView, System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, int columnIndex, System.Windows.Forms.DataGridViewElementStates cellState, object? value, object? formattedValue, string? errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle? advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);
new System.Windows.Forms.DataGridViewCellPaintingEventArgs : System.Windows.Forms.DataGridView * System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * int * System.Windows.Forms.DataGridViewElementStates * obj * obj * string * System.Windows.Forms.DataGridViewCellStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewPaintParts -> System.Windows.Forms.DataGridViewCellPaintingEventArgs
Public Sub New (dataGridView As DataGridView, graphics As Graphics, clipBounds As Rectangle, cellBounds As Rectangle, rowIndex As Integer, columnIndex As Integer, cellState As DataGridViewElementStates, value As Object, formattedValue As Object, errorText As String, cellStyle As DataGridViewCellStyle, advancedBorderStyle As DataGridViewAdvancedBorderStyle, paintParts As DataGridViewPaintParts)

Параметры

dataGridView
DataGridView

Объект DataGridView, содержащий окрашиваемую ячейку.

graphics
Graphics

Объект Graphics, используемый для закрашивания DataGridViewCell.

clipBounds
Rectangle

Объект Rectangle, представляющий область DataGridView, которую требуется перезакрасить.

cellBounds
Rectangle

Объект Rectangle, содержащий границы закрашиваемого DataGridViewCell.

rowIndex
Int32

Индекс строки, содержащей закрашиваемую ячейку.

columnIndex
Int32

Индекс столбца закрашиваемой ячейки.

cellState
DataGridViewElementStates

Битовая комбинация значений DataGridViewElementStates, которая задает состояние ячейки.

value
Object

Данные закрашиваемой ячейки DataGridViewCell.

formattedValue
Object

Форматированные данные закрашиваемой ячейки DataGridViewCell.

errorText
String

Сообщение об ошибке, связанное с ячейкой.

cellStyle
DataGridViewCellStyle

Объект DataGridViewCellStyle, содержащий сведения о форматировании и стиле ячейки.

advancedBorderStyle
DataGridViewAdvancedBorderStyle

Объект DataGridViewAdvancedBorderStyle, содержащий стили границ для закрашиваемой ячейки.

paintParts
DataGridViewPaintParts

Поразрядная комбинация значений DataGridViewPaintParts, задающая окрашиваемые части.

Исключения

dataGridView имеет значение null.

-или-

graphics имеет значение null.

-или-

cellStyle имеет значение null.

Параметр paintParts не является допустимой битовой комбинацией значений DataGridViewPaintParts.

Применяется к

См. также раздел