Lesson VIII. Checkbox
Objectives
ü To be
able to use and be familiar with the Checkbox and its properties
ü To be
familiar with the different Checkbox styles
![]()
CheckBoxes work
just like the OptionButton, with two differences: a selected CheckBox
shows the selection with a checkmark and are never mutually exclusive. Therefore, the user can select one or more CheckBoxes
even if those boxes reside in the same Frame or on the same Form.
![]()
Examples of Checkboxes
How do I know if a CheckBox
has been checked? A CheckBox has
a value property that may be 0, 1, or 2. When the value of this property is 0,
the CheckBox is currently unchecked.
If the value is 1, the CheckBox is checked. The CheckBox is disabled if this
value is equal to 2.
CheckBoxes may also
look like CommandButtons (only that a checked graphical CheckBox
appears in a pressed state).
Just set the Style property to 1: Graphical (the examples
above are CheckBoxes of Style set to 0: Standard, which is
the default). The following Form
illustrates the various CheckBox property options available.


Thin
Crust P 60.00
Thick
Crust P 95.00
Add-ons:
Extra
Cheese P 8.00
Extra
Ham P10.00
Extra
Onions P 5.00
Dine
Out additional P
20.00
The total
cost should reflect in a Label.
Your application should look like the following Form:

2. Make a program
that formats the Label’s display using 3 CheckBoxes. The CheckBoxes are: Bold, Italic,
and Underlined. If the user
checks Bold, then the Label’s caption is made bold. Refer to the Form below.

[ Home ]