CheckBox Control

Description

Displays the selection state of an item.

Remarks

Use a CheckBox to give the user a choice between two values such as Yes/No, True/False, or On/Off. When the user selects a CheckBox, it displays a special mark (such as an X) and its current setting is Yes, True, or On; if the user does not select the CheckBox, it is empty and its setting is No, False, or Off. Depending on the value of the TripleState property, a CheckBox can also have a null value.

If a CheckBox is bound to a data source, changing the setting changes the value of that source. A disabled CheckBox shows the current value, but is dimmed and does not allow changes to the value from the user interface.

You can also use check boxes inside a group box to select one or more of a group of related items. For example, you can create an order form that contains a list of available items, with a CheckBox preceding each item. The user can select a particular item or items by checking the corresponding CheckBox.

The default property of a CheckBox is the Value property.

The default event of a CheckBox is the Click event.

Note The ListBox also lets you put a check mark by selected options. Depending on your application, you can use the ListBox instead of using a group of CheckBox controls.

Properties

Accelerator property, Alignment property, AutoSize property, BackColor property, BackStyle property, BoundValue property, Caption property, ControlSource property, ControlTipText property, Enabled property, Font object, ForeColor property, Height, Width properties, HelpContextID property, LayoutEffect property, Left, Top properties, Locked property, MouseIcon property, MousePointer property, Name property, Object property, OldHeight, OldWidth properties, OldLeft, OldTop properties, Parent property, Picture property, PicturePosition property, SpecialEffect property, TabIndex property, TabStop property, Tag property, TripleState property, Value property, Visible property, WordWrap property.

Methods

Move method, SetFocus method, ZOrder method.

Events

AfterUpdate event, BeforeDragOver event, BeforeDropOrPaste event, BeforeUpdate event, Change event, Click event, DblClick event, Enter, Exit events, Error event, KeyDown, KeyUp events, KeyPress event, MouseDown, MouseUp events, MouseMove event.

See Also

ListBox control.

Example

See the Enabled property example.

Example

See the MatchFound property example.