Bagikan melalui


DataGridViewCell.GetErrorIconBounds Metode

Definisi

Mengembalikan persegi panjang pembatas yang mengapit ikon kesalahan sel, jika ditampilkan.

protected:
 virtual System::Drawing::Rectangle GetErrorIconBounds(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex);
protected virtual System.Drawing.Rectangle GetErrorIconBounds (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex);
abstract member GetErrorIconBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle
override this.GetErrorIconBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle
Protected Overridable Function GetErrorIconBounds (graphics As Graphics, cellStyle As DataGridViewCellStyle, rowIndex As Integer) As Rectangle

Parameter

graphics
Graphics

Konteks grafik untuk sel.

cellStyle
DataGridViewCellStyle

yang DataGridViewCellStyle akan diterapkan ke sel.

rowIndex
Int32

Indeks baris induk sel.

Mengembalikan

Rectangle yang mengikat ikon kesalahan sel, jika salah satu ditampilkan; jika tidak, Empty.

Keterangan

Ukuran area ikon kesalahan sel dihitung secara dinamis ketika metode ini dipanggil. Implementasi kelas dasar selalu mengembalikan Rectangle.Empty.

Metode ini dipanggil secara internal ketika ErrorIconBounds properti dibaca.

Berlaku untuk

Lihat juga