DataGridViewColumnHeaderCell.GetContentBounds Yöntem

Tanım

Belirtilen Graphics nesne ve hücre stili kullanılarak hesaplanan hücrenin içerik alanını çevreleyen sınırlayıcı dikdörtgeni döndürür.

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

Parametreler

graphics
Graphics

Hücrenin grafik bağlamı.

cellStyle
DataGridViewCellStyle

DataGridViewCellStyle Hücreye uygulanacak olan.

rowIndex
Int32

Hücrenin üst satırının dizini.

Döndürülenler

Rectangle

Hücrenin Rectangle içeriğini sınırlayan.

Özel durumlar

rowIndex -1 değil.

Açıklamalar

Bu yöntem çağrıldığında hücre içeriğinin boyutu dinamik olarak hesaplanır. Özellik okunduğunda ContentBounds bu yöntem dahili olarak çağrılır.

Şunlara uygulanır

Ayrıca bkz.