PropertyTabChangedEventArgs.OldTab Propiedad

Definición

Obtiene la antigua PropertyTab seleccionada.

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 propiedad

Antigua PropertyTab que se había seleccionado.

Ejemplos

En el ejemplo de código siguiente se muestra el uso de este miembro. En el ejemplo, un controlador de eventos informa sobre la aparición del PropertyGrid.PropertyTabChanged evento. Este informe le ayuda a aprender cuándo se produce el evento y puede ayudarle a depurar. Para informar sobre varios eventos o eventos que se producen con frecuencia, considere la posibilidad de reemplazar MessageBox.Show por Console.WriteLine o anexar el mensaje a una línea TextBoxmúltiple.

Para ejecutar el código de ejemplo, péguelo en un proyecto que contenga una instancia de tipo PropertyGrid denominada PropertyGrid1. A continuación, asegúrese de que el controlador de eventos está asociado al 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

Se aplica a