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

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

DataGridViewColumnHeaderCell.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 ではありません。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewColumnHeaderCell クラス
DataGridViewColumnHeaderCell メンバ
System.Windows.Forms 名前空間
Size
DataGridView クラス
DataGridViewCellStyle クラス
その他の技術情報
Windows フォーム DataGridView コントロールでのセルスタイル


このページでは「.NET Framework クラス ライブラリ リファレンス」からDataGridViewColumnHeaderCell.GetPreferredSize メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDataGridViewColumnHeaderCell.GetPreferredSize メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDataGridViewColumnHeaderCell.GetPreferredSize メソッド を検索

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS