CheckBox (chb)

alt textCheckBox - Allows the user to select or deselect an option.

The CheckedChange event does not fire if you set the value to False when the form loads.


Examples

alt text

Useful Code

if (this.CheckBox1.Checked == false) 
{
   this.CheckBox1.Checked = true;
}

this.Checkbox1.CheckState 

Properties

AppearanceGets or sets the value that determines the appearance of a CheckBox control.
AutoCheckGets or set a value indicating whether the Checked or CheckState values and the CheckBox's appearance are automatically changed when the CheckBox is clicked.
AutoEllipsis Gets or sets a value indicating whether the ellipsis character (...) appears at the right edge of the control, denoting that the control text extends beyond the specified length of the control. (Inherited from ButtonBase.)
AutoSize Gets or sets a value that indicates whether the control resizes based on its contents. (Inherited from ButtonBase.)
BackColorGets or sets the background color of the control. (Inherited from ButtonBase.)
CheckAlignGets or sets the horizontal and vertical alignment of the check mark on a CheckBox control.
CheckedGets or set a value indicating whether the CheckBox is in the checked state.
CheckStateGets or sets the state of the CheckBox.
DefaultImeMode Gets the default Input Method Editor (IME) mode supported by this control. (Inherited from ButtonBase.)
FlatAppearance Gets the appearance of the border and the colors used to indicate check state and mouse state. (Inherited from ButtonBase.)
FlatStyleGets or sets the flat style appearance of the button control. (Inherited from ButtonBase.)
ImageGets or sets the image that is displayed on a button control. (Inherited from ButtonBase.)
ImageAlignGets or sets the alignment of the image on the button control. (Inherited from ButtonBase.)
ImageIndexGets or sets the alignment of the image on the button control. (Inherited from ButtonBase.)
ImageKeyGets or sets the key accessor for the image in the ImageList. (Inherited from ButtonBase.)
ImageListGets or sets the ImageList that contains the Image displayed on a button control. (Inherited from ButtonBase.)
IsDefault Gets or sets a value indicating whether the button control is the default button. (Inherited from ButtonBase.)
Text(Inherited from ButtonBase.)
TextAlignOverridden. Gets or sets the alignment of the text on the CheckBox control.
ThreeStateGets or sets a value indicating whether the CheckBox will allow three check states rather than two.
UseCompatibleTextRendering Gets or sets a value that determines whether to use the compatible text rendering engine (GDI+) or not (GDI). (Inherited from ButtonBase.)
UseMnemonic Gets or sets a value indicating whether an ampersand (&) is included in the text of the control. (Inherited from ButtonBase.)
UseVisualStyleBackColor Gets or sets a value that determines if the background is drawn using visual styles, if supported. (Inherited from ButtonBase.)

Methods

CreateAccessibilityInstance Overridden. Creates a new accessibility object for the CheckBox control.
Dispose Overloaded. Releases the resources used by the ButtonBase. (Inherited from ButtonBase.)
GetPreferredSize Retrieves the size of a rectangular area into which a control can be fitted. (Inherited from ButtonBase.)
OnClick Overridden. Raises the Click event.
ToString Overridden. Returns a string that represents the current CheckBox control.

Events

AutoSizeChanged Occurs when the value of the AutoSize property changes. (Inherited from ButtonBase.)
CheckedChanged Occurs when the value of the Checked property changes.
CheckStateChanged Occurs when the value of the CheckState property changes.
DoubleClick Occurs when the user double-clicks the CheckBox control.
ImeModeChanged Occurs when the ImeMode property is changed. This event is not relevant for this class. (Inherited from ButtonBase.)
MouseDoubleClick Occurs when the user double-clicks the CheckBox control.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext