RadioButton.Appearance Proprietà

Definizione

Ottiene o imposta un valore che determina l'aspetto dell'oggetto RadioButton.

public:
 property System::Windows::Forms::Appearance Appearance { System::Windows::Forms::Appearance get(); void set(System::Windows::Forms::Appearance value); };
public System.Windows.Forms.Appearance Appearance { get; set; }
member this.Appearance : System.Windows.Forms.Appearance with get, set
Public Property Appearance As Appearance

Valore della proprietà

Appearance

Uno dei valori di Appearance. Il valore predefinito è Normal.

Eccezioni

Il valore assegnato non è uno dei valori di Appearance.

Esempio

L'esempio di codice seguente crea e inizializza un RadioButtonoggetto , fornisce l'aspetto di un controllo disattiva, imposta la relativa AutoCheck proprietà su falsee lo aggiunge a un Formoggetto .

private void InitializeMyRadioButton()
{
   // Create and initialize a new RadioButton.
   RadioButton radioButton1 = new RadioButton();

   // Make the radio button control appear as a toggle button.
   radioButton1.Appearance = Appearance.Button;

   // Turn off the update of the display on the click of the control.
   radioButton1.AutoCheck = false;

   // Add the radio button to the form.
   Controls.Add(radioButton1);
}
Private Sub InitializeMyRadioButton()
    ' Create and initialize a new RadioButton. 
    Dim radioButton1 As New RadioButton()
       
    ' Make the radio button control appear as a toggle button.
    radioButton1.Appearance = Appearance.Button
       
    ' Turn off the update of the display on the click of the control.
    radioButton1.AutoCheck = False
       
    ' Add the radio button to the form.
    Controls.Add(radioButton1)
End Sub

Commenti

Se il Appearance valore è impostato su Normal, il RadioButton controllo viene disegnato con una casella di controllo circolare. Se il valore è impostato su Button, viene RadioButton disegnato come controllo che può essere attivato su uno stato su o giù. Il tipo può visualizzare testo, un'immagine o entrambi.

Si applica a

Vedi anche