PropertyTabChangedEventArgs.OldTab Propriedade

Definição

Seleciona o antigo PropertyTab .

public:
 property System::Windows::Forms::Design::PropertyTab ^ OldTab { System::Windows::Forms::Design::PropertyTab ^ get(); };
public System.Windows.Forms.Design.PropertyTab OldTab { get; }
public System.Windows.Forms.Design.PropertyTab? OldTab { get; }
member this.OldTab : System.Windows.Forms.Design.PropertyTab
Public ReadOnly Property OldTab As PropertyTab

Valor de Propriedade

O antigo PropertyTab que foi selecionado.

Exemplos

O seguinte exemplo de código demonstra a utilização deste elemento. No exemplo, um gestor de eventos reporta a ocorrência do PropertyGrid.PropertyTabChanged evento. Este relatório ajuda-o a saber quando o evento ocorre e pode ajudá-lo na depuração. Para reportar múltiplos eventos ou eventos que ocorrem frequentemente, considere substituir MessageBox.Show ou Console.WriteLine anexar a mensagem a uma multilinha TextBox.

Para executar o código de exemplo, cole-o num projeto que contenha uma instância do tipo PropertyGrid chamada PropertyGrid1. Depois, certifique-se de que o gestor de eventos está associado ao PropertyGrid.PropertyTabChanged evento.

private void PropertyGrid1_PropertyTabChanged(Object sender, PropertyTabChangedEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "OldTab", e.OldTab );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "NewTab", e.NewTab );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "PropertyTabChanged Event" );
}
Private Sub PropertyGrid1_PropertyTabChanged(sender as Object, e as PropertyTabChangedEventArgs) _ 
     Handles PropertyGrid1.PropertyTabChanged

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

End Sub

Aplica-se a