DataGridViewComboBoxCell.GetPreferredSize Metoda

Definicja

Oblicza preferowany rozmiar komórki w pikselach.

protected:
 override System::Drawing::Size GetPreferredSize(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex, System::Drawing::Size constraintSize);
protected override System.Drawing.Size GetPreferredSize (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex, System.Drawing.Size constraintSize);
override this.GetPreferredSize : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int * System.Drawing.Size -> System.Drawing.Size
Protected Overrides Function GetPreferredSize (graphics As Graphics, cellStyle As DataGridViewCellStyle, rowIndex As Integer, constraintSize As Size) As Size

Parametry

graphics
Graphics

Obiekt Graphics używany do rysowania komórki.

cellStyle
DataGridViewCellStyle

Obiekt DataGridViewCellStyle reprezentujący styl komórki.

rowIndex
Int32

Indeks wiersza zerowego komórki.

constraintSize
Size

Maksymalny dozwolony rozmiar komórki.

Zwraca

Obiekt Size reprezentujący preferowany rozmiar komórki w pikselach.

Dotyczy

Zobacz też