DataGridViewCell.GetErrorIconBounds Metoda

Definicja

Zwraca prostokąt ograniczenia, który otacza ikonę błędu komórki, jeśli jest wyświetlany.

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

Parametry

graphics
Graphics

Kontekst graficzny komórki.

cellStyle
DataGridViewCellStyle

Element DataGridViewCellStyle do zastosowania do komórki.

rowIndex
Int32

Indeks wiersza nadrzędnego komórki.

Zwraca

ElementRectangle, który wiąże ikonę błędu komórki, jeśli jest wyświetlany; w przeciwnym razie . Empty

Uwagi

Rozmiar obszaru ikony błędu komórki jest obliczany dynamicznie po wywołaniu tej metody. Implementacja klasy bazowej zawsze zwraca wartość Rectangle.Empty.

Ta metoda jest wywoływana wewnętrznie, gdy ErrorIconBounds właściwość jest odczytywana.

Dotyczy

Zobacz też