DataGridView.RowHeightChanged イベント
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As DataGridView Dim handler As DataGridViewRowEventHandler AddHandler instance.RowHeightChanged, handler
public: event DataGridViewRowEventHandler^ RowHeightChanged { void add (DataGridViewRowEventHandler^ value); void remove (DataGridViewRowEventHandler^ value); }


このイベントの使用方法を次のコード例に示します。次の例は「方法 : Windows フォームの DataGridView コントロールの行の外観をカスタマイズする」で取り上げている例の一部です。
' Adjusts the padding when the user changes the row height so that ' the normal cell content is fully displayed and any extra ' height is used for the content that spans multiple columns. Sub dataGridView1_RowHeightChanged(ByVal sender As Object, _ ByVal e As DataGridViewRowEventArgs) _ Handles dataGridView1.RowHeightChanged ' Calculate the new height of the normal cell content. Dim preferredNormalContentHeight As Int32 = _ e.Row.GetPreferredHeight(e.Row.Index, _ DataGridViewAutoSizeRowMode.AllCellsExceptHeader, True) - _ e.Row.DefaultCellStyle.Padding.Bottom() ' Specify a new padding. Dim newPadding As Padding = e.Row.DefaultCellStyle.Padding newPadding.Bottom = e.Row.Height - preferredNormalContentHeight e.Row.DefaultCellStyle.Padding = newPadding End Sub
// Adjusts the padding when the user changes the row height so that // the normal cell content is fully displayed and any extra // height is used for the content that spans multiple columns. void dataGridView1_RowHeightChanged(object sender, DataGridViewRowEventArgs e) { // Calculate the new height of the normal cell content. Int32 preferredNormalContentHeight = e.Row.GetPreferredHeight(e.Row.Index, DataGridViewAutoSizeRowMode.AllCellsExceptHeader, true) - e.Row.DefaultCellStyle.Padding.Bottom; // Specify a new padding. Padding newPadding = e.Row.DefaultCellStyle.Padding; newPadding.Bottom = e.Row.Height - preferredNormalContentHeight; e.Row.DefaultCellStyle.Padding = newPadding; }

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


DataGridView クラス
DataGridView メンバ
System.Windows.Forms 名前空間
その他の技術情報
DataGridView コントロール (Windows フォーム)
Weblioに収録されているすべての辞書からDataGridView.RowHeightChanged イベントを検索する場合は、下記のリンクをクリックしてください。

- DataGridView.RowHeightChanged イベントのページへのリンク