CheckBox.Appearance CheckBox.Appearance CheckBox.Appearance CheckBox.Appearance Property

Definición

Obtiene o establece el valor que determina el aspecto de un control CheckBox.Gets or sets the value that determines the appearance of a CheckBox control.

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

Valor de propiedad

Uno de los valores de Appearance.One of the Appearance values. El valor predeterminado es Normal.The default value is Normal.

Excepciones

El valor asignado no es uno de los valores de Appearance.The value assigned is not one of the Appearance values.

Ejemplos

En el ejemplo de código siguiente se crea e inicializa un CheckBox, le da la apariencia de un botón de alternancia, establece AutoCheck a falsey lo agrega a un Form.The following code example creates and initializes a CheckBox, gives it the appearance of a toggle button, sets AutoCheck to false, and adds it to a Form.

public:
   void InstantiateMyCheckBox()
   {
      // Create and initialize a CheckBox.   
      CheckBox^ checkBox1 = gcnew CheckBox;
      
      // Make the check box control appear as a toggle button.
      checkBox1->Appearance = Appearance::Button;
      
      // Turn off the update of the display on the click of the control.
      checkBox1->AutoCheck = false;
      
      // Add the check box control to the form.
      this->Controls->Add( checkBox1 );
   }
public void InstantiateMyCheckBox()
 {
    // Create and initialize a CheckBox.   
    CheckBox checkBox1 = new CheckBox(); 
    
    // Make the check box control appear as a toggle button.
    checkBox1.Appearance = Appearance.Button;
 
    // Turn off the update of the display on the click of the control.
    checkBox1.AutoCheck = false;
 
    // Add the check box control to the form.
    Controls.Add(checkBox1);
 }
 
Public Sub InstantiateMyCheckBox()
    ' Create and initialize a CheckBox.   
    Dim checkBox1 As New CheckBox()
    
    ' Make the check box control appear as a toggle button.
    checkBox1.Appearance = Appearance.Button
    
    ' Turn off the update of the display on the click of the control.
    checkBox1.AutoCheck = False
    
    ' Add the check box control to the form.
    Controls.Add(checkBox1)
End Sub 'InstantiateMyCheckBox

Comentarios

Si Appearance valor se establece en Normal, el CheckBox tiene un aspecto típico.If Appearance value is set to Normal, the CheckBox has a typical appearance. Si el valor se establece en Button, CheckBox aparece como un botón de alternancia que puede activar o desactivar hacia arriba o hacia abajo de estado.If the value is set to Button, the CheckBox appears like a toggle button, which can be toggled to an up or down state.

Se aplica a

Consulte también: