DataGridViewRowHeightInfoPushedEventArgs 類別

定義

提供 RowHeightInfoPushedDataGridView 事件的資料。

public ref class DataGridViewRowHeightInfoPushedEventArgs : System::ComponentModel::HandledEventArgs
public class DataGridViewRowHeightInfoPushedEventArgs : System.ComponentModel.HandledEventArgs
type DataGridViewRowHeightInfoPushedEventArgs = class
    inherit HandledEventArgs
Public Class DataGridViewRowHeightInfoPushedEventArgs
Inherits HandledEventArgs
繼承
DataGridViewRowHeightInfoPushedEventArgs

範例

下列程式碼範例示範此類型的用法。 在此範例中,事件處理常式會報告事件發生次數 RowHeightInfoPushed 。 此報告可協助您瞭解事件發生的時間,並可協助您進行偵錯。 若要報告多個事件或經常發生的事件,請考慮將 取代 ShowConsole.WriteLine 為 或將訊息附加至多行 TextBox

若要執行範例程式碼,請將它貼到包含名為 DataGridView1 之型 DataGridView 別實例的專案。 然後,確定事件處理常式與事件相關聯 RowHeightInfoPushed

private void DataGridView1_RowHeightInfoPushed(Object sender, DataGridViewRowHeightInfoPushedEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "Height", e.Height );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "MinimumHeight", e.MinimumHeight );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "RowIndex", e.RowIndex );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Handled", e.Handled );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "RowHeightInfoPushed Event" );
}
Private Sub DataGridView1_RowHeightInfoPushed(sender as Object, e as DataGridViewRowHeightInfoPushedEventArgs) _ 
     Handles DataGridView1.RowHeightInfoPushed

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "Height", e.Height)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "MinimumHeight", e.MinimumHeight)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "RowIndex", e.RowIndex)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Handled", e.Handled)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"RowHeightInfoPushed Event")

End Sub

備註

如需如何處理事件的詳細資訊,請參閱 處理和引發事件

屬性

Handled

取得或設定值,指出事件處理常式已經完全處理事件或系統應繼續自己的處理。

(繼承來源 HandledEventArgs)
Height

取得發生事件之資料列的高度。

MinimumHeight

取得發生事件之資料列的最小高度。

RowIndex

取得發生事件之資料列的索引。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱