DataGrid.PreferredRowHeight プロパティ
System.Windows.Forms.DataGrid コントロールの行の適切な高さを取得または設定します。
名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
Dim instance As DataGrid Dim value As Integer value = instance.PreferredRowHeight instance.PreferredRowHeight = value
/** @property */ public int get_PreferredRowHeight () /** @property */ public void set_PreferredRowHeight (int value)
public function get PreferredRowHeight () : int public function set PreferredRowHeight (value : int)
プロパティ値
行の高さ。

このプロパティを設定してから、DataSource プロパティと DataMember プロパティを個別または SetDataBinding メソッドを通じてリセットします。この操作を行わないと、このプロパティを有効にすることはできません。

新しいフォントを設定してから、PreferredRowHeight を新しいフォントと同じ高さに設定するコード例を次に示します。
Private Sub ChangeFontHeight(ByVal myGrid As DataGrid) ' Change the font first. myGrid.Font = New System.Drawing.Font _ ("Microsoft Sans Serif", 15, _ System.Drawing.FontStyle.Regular) myGrid.PreferredRowHeight = myGrid.Font.Height End Sub
private void ChangeFontHeight(DataGrid myGrid) { myGrid.Font = new System.Drawing.Font ("Microsoft Sans Serif", 15, System.Drawing.FontStyle.Regular); myGrid.PreferredRowHeight = myGrid.Font.Height; }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDataGrid.PreferredRowHeight プロパティを検索する場合は、下記のリンクをクリックしてください。

- DataGrid.PreferredRowHeight プロパティのページへのリンク