DataGridViewTopLeftHeaderCell.GetContentBounds Metod

Definition

Returnerar den avgränsningsrektangel som omger cellens innehållsområde, som beräknas med det angivna Graphics objektet och cellformatet.

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

Parametrar

graphics
Graphics

Cellens grafikkontext.

cellStyle
DataGridViewCellStyle

Som DataGridViewCellStyle ska tillämpas på cellen.

rowIndex
Int32

Indexet för cellens överordnade rad.

Returer

Det Rectangle som begränsar cellens innehåll.

Undantag

rowIndex är inte lika med -1.

Kommentarer

Storleken på cellens innehåll beräknas dynamiskt när den här metoden anropas.

Den här metoden anropas internt när egenskapen ContentBounds läse.

Gäller för

Se även