CheckBox Control

Description

The CheckBox control indicates whether a particular condition is on or off. It is commonly used to present a Yes/No or True/False selection to the user.
You can use check box controls in groups to display multiple choices from which the user can select one or more.
It is similar to the RadioButton control, but any number of grouped CheckBox controls may be selected.

Usage

Use checkboxes to allow the operator to turn application preferences on or off.
Typically, you would add the checkboxes to a GroupBox control.
Use the Checked property to determine if the user checked the box.

Setting CheckBox Appearance
Use the BorderStyle, ForeColor, BackColor, Font, Image, ImageAlign, and TextAlign properties to change the appearance of the checkbox.

CheckBox Control Properties

Property Description
BackColor

The background color for the control.

Default: Control

Checked

Sets whether the control is checked at runtime.

Default False

Enabled

Sets whether the control is enabled at runtime.

Default: True

EventTaskType

The type of task used for events.

Default: Normal

Font

The font for the control text.

Default: Microsoft Sans Serif 8.25 pt

FontBold

The bold attribute for the current font

Default False

FontItalic

The italic attribute for the current font

Default False

FontName

The name for the current font

Default: Microsoft Sans Serif

FontSize

The size for the current font in points

Default: 8.25

ForeColor

The foreground color for the control text.

Default: ControlText

Height The height of the control in pixels.
Image

The picture for the control. To delete, press the [Delete] key.

Default: Empty

ImageAlign

The picture alignment for the control.

Default: MiddleCenter

Left The left coordinate of the control in pixels.
Name

The name of the control.

Default: CheckBoxXX

TabIndex The tab index of the control.
Text

The text of the control.

Default: Name of control

TextAlign

Selects the text alignment.

Default: MiddleLeft

ToolTipText

The text used in the control’s tooltip.

Default: Empty

Top The top coordinate of the control in pixels.
Visible

Whether the control is visible or not at runtime.

Default: True

Width The width of the control in pixels.

CheckBox Control Events

Event Description
Click Executes when the user clicks the control with the mouse.