Sdílet prostřednictvím


DataGridView.RowDividerHeightChanged Událost

Definice

Nastane, když se DividerHeight vlastnost změní.

public:
 event System::Windows::Forms::DataGridViewRowEventHandler ^ RowDividerHeightChanged;
public event System.Windows.Forms.DataGridViewRowEventHandler RowDividerHeightChanged;
public event System.Windows.Forms.DataGridViewRowEventHandler? RowDividerHeightChanged;
member this.RowDividerHeightChanged : System.Windows.Forms.DataGridViewRowEventHandler 
Public Custom Event RowDividerHeightChanged As DataGridViewRowEventHandler 

Event Type

Příklady

Následující příklad kódu ukazuje použití tohoto člena. V tomto příkladu obslužná rutina události hlásí výskyt RowDividerHeightChanged události. Tato sestava vám pomůže zjistit, kdy k události dojde, a může vám pomoct při ladění. Chcete-li hlásit více událostí nebo událostí, ke kterým dochází často, zvažte nahrazení MessageBox.ShowConsole.WriteLine nebo připojení zprávy do víceřádkového řetězce TextBox.

Pokud chcete spustit ukázkový kód, vložte ho do projektu, který obsahuje instanci typu DataGridView s názvem DataGridView1. Potom se ujistěte, že je obslužná rutina události přidružená k RowDividerHeightChanged události.

private void DataGridView1_RowDividerHeightChanged(Object sender, DataGridViewRowEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "Row", e.Row );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "RowDividerHeightChanged Event" );
}
Private Sub DataGridView1_RowDividerHeightChanged(sender as Object, e as DataGridViewRowEventArgs) _ 
     Handles DataGridView1.RowDividerHeightChanged

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "Row", e.Row)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"RowDividerHeightChanged Event")

End Sub

Poznámky

Výška děliče je upravena nastavením DividerHeight vlastnosti.

Další informace o zpracování událostí naleznete v tématu Zpracování a vyvolávání událostí.

Platí pro

Viz také