Gets or sets the value that determines the appearance oa a check box control.
[Visual Basic] Public Property Appearance As Appearance [C#] public Appearance Appearance {get; set;} [C++] public: __property Appearance get_Appearance(); public: __property void set_Appearance(Appearance); [JScript] public function get Appearance() : Appearance; public function set Appearance(Appearance);
One of the Appearance values. The default value is Normal.
Exception Type | Condition |
---|---|
InvalidEnumArgumentException | The value assigned is not one of the Appearance values. |
If Appearance value is set to Normal, the check box has a typical appearance. If the value is set to Button, the check box appears like a toggle button, which may be toggled to an up or down state.
The following example instantiates a CheckBox, gives it the appearance of a toggle button and sets AutoCheck to false.
[Visual Basic]
' Instantiate a CheckBox. Private CheckBox1 As System.WinForms.CheckBox Private Sub MySub() ' Initialize a new CheckBox. Form1.CheckBox1 = New System.WinForms.CheckBox ' Make the checkbox 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. Form1.Controls.Add(CheckBox1) End Sub
CheckBox Class | CheckBox Members | System.WinForms Namespace | Appearance