RadioButton.Appearance Vlastnost

Definice

Získá nebo nastaví hodnotu určující vzhled 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

Hodnota vlastnosti

Appearance

Jedna z Appearance hodnot. Výchozí hodnota je Normal.

Výjimky

Přiřazená hodnota není jednou z Appearance hodnot.

Příklady

Následující příklad kódu vytvoří a inicializuje RadioButton, dává vzhled přepínače ovládací prvek, nastaví jeho AutoCheck vlastnost na false, a přidá ho do Form.

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

Poznámky

Appearance Pokud je hodnota nastavena na Normal, RadioButton ovládací prvek se nakreslí kruhovým zaškrtávacím políčku. Pokud je hodnota nastavená na Button, RadioButton pak se nakreslí jako ovládací prvek, který lze přepnout na stav nahoru nebo dolů. Typ může zobrazovat text, obrázek nebo obojí.

Platí pro

Viz také