RadioButton.Appearance Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit une valeur déterminant l’apparence du 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
Valeur de propriété
Une des Appearance valeurs. La valeur par défaut est Normal.
Exceptions
La valeur affectée n’est pas l’une des Appearance valeurs.
Exemples
L’exemple de code suivant crée et initialise un RadioButton, lui donne l’apparence d’un contrôle bascule, définit sa AutoCheck propriété falsesur , et l’ajoute à un 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
Remarques
Si la Appearance valeur est définie Normal, le RadioButton contrôle est dessiné avec une case à cocher circulaire. Si la valeur est définie Button, la RadioButton valeur est dessinée sous la forme d’un contrôle qui peut être bascule vers le haut ou vers le bas. L’un ou l’autre type peut afficher du texte, une image ou les deux.