Represents a Windows System.Windows.Forms.CheckBox.
See Also: CheckBox Members
System.Windows.Forms.CheckBox and System.Windows.Forms.RadioButton controls have a similar function: they allow the user to choose from a list of options. System.Windows.Forms.CheckBox controls let the user pick a combination of options. In contrast, System.Windows.Forms.RadioButton controls allow a user to choose from mutually exclusive options.
The CheckBox.ThreeState property determines whether the control supports two or three states. Use the CheckBox.Checked property to get or set the value of a two-state System.Windows.Forms.CheckBox control and use the CheckBox.CheckState property to get or set the value of a three-state System.Windows.Forms.CheckBox control.
The ButtonBase.FlatStyle property determines the style and appearance of the control. If the ButtonBase.FlatStyle property is set to FlatStyle.System, the user's operating system determines the appearance of the control.
When the ButtonBase.FlatStyle property is set to FlatStyle.System, the CheckBox.CheckAlign property is ignored and the control is displayed using the System.Drawing.ContentAlignment.MiddleLeft or System.Drawing.ContentAlignment.MiddleRight alignment. If the CheckBox.CheckAlign property is set to one of the right alignments, the control is displayed using the System.Drawing.ContentAlignment.MiddleRight alignment; otherwise, it is displayed using the System.Drawing.ContentAlignment.MiddleLeft alignment.
The following describes an indeterminate state: You have a System.Windows.Forms.CheckBox that determines if the selected text in a System.Windows.Forms.RichTextBox is bold. When you select text you can click the System.Windows.Forms.CheckBox to bold the selection. Likewise, when you select some text, the System.Windows.Forms.CheckBox displays whether the selected text is bold. If your selected text contains text that is bold and normal, the System.Windows.Forms.CheckBox will have an indeterminate state.