Share via


DataGridViewTextBoxCell.GetPreferredSize Metoda

Definice

Vypočítá upřednostňovanou velikost buňky v pixelech.

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

Slouží Graphics k nakreslení buňky.

cellStyle
DataGridViewCellStyle

A DataGridViewCellStyle představující styl buňky.

rowIndex
Int32

Index řádku buňky založený na nule.

constraintSize
Size

Maximální povolená velikost buňky

Návraty

A Size , který představuje upřednostňovanou velikost buňky v pixelech.

Platí pro

Viz také