DataGridViewTopLeftHeaderCell.GetPreferredSize メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridViewTopLeftHeaderCell.GetPreferredSize メソッドの意味・解説 

DataGridViewTopLeftHeaderCell.GetPreferredSize メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

セル推奨されるサイズピクセル単位計算します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Protected Overrides Function
 GetPreferredSize ( _
    graphics As Graphics, _
    cellStyle As DataGridViewCellStyle, _
    rowIndex As Integer, _
    constraintSize As Size _
) As Size
Dim graphics As Graphics
Dim cellStyle As DataGridViewCellStyle
Dim rowIndex As Integer
Dim constraintSize As Size
Dim returnValue As Size

returnValue = Me.GetPreferredSize(graphics, cellStyle, rowIndex,
 constraintSize)
protected override Size GetPreferredSize (
    Graphics graphics,
    DataGridViewCellStyle cellStyle,
    int rowIndex,
    Size constraintSize
)
protected:
virtual Size GetPreferredSize (
    Graphics^ graphics, 
    DataGridViewCellStyle^ cellStyle, 
    int rowIndex, 
    Size constraintSize
) override
protected Size GetPreferredSize (
    Graphics graphics, 
    DataGridViewCellStyle cellStyle, 
    int rowIndex, 
    Size constraintSize
)
protected override function GetPreferredSize
 (
    graphics : Graphics, 
    cellStyle : DataGridViewCellStyle, 
    rowIndex : int, 
    constraintSize : Size
) : Size

パラメータ

graphics

セル描画使用する Graphics

cellStyle

セルスタイルを表す DataGridViewCellStyle。

rowIndex

セルの 0 から始まる行インデックス番号

constraintSize

セル最大許容サイズ

戻り値
セル推奨されるサイズピクセル単位で表す Size

例外例外
例外種類条件

ArgumentOutOfRangeException

rowIndex が -1 ではありません。

解説解説

このメソッドは、DataGridViewCell.GetFormattedValue メソッド依存してます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewTopLeftHeaderCell クラス
DataGridViewTopLeftHeaderCell メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridViewCellStyle クラス
DataGridViewCell.GetFormattedValue



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DataGridViewTopLeftHeaderCell.GetPreferredSize メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGridViewTopLeftHeaderCell.GetPreferredSize メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS