Page 60 - Open Soource Technologies 304.indd
P. 60

Event Driven Programming






















                                             Figure 3.14: A Command Button with Colored Text.


                                        Only one Command Button on a form can have its Default property set to
                                        True at a time. If you set one Command Button to be the default, all other
                                        buttons will have their Default property set to False. The same rule applies
                                        for the Cancel property.



                          3.4.5 CheckBox

                          CheckBoxes are those controls which gives us an option to select, say, Yes/No or True/False.
                          A CheckBox is clicked to select and clicked again to deselect some option. When a checkbox is
                          selected a check (a tick mark) appears indicating a selection. The CheckBox control is based on
                          the TextBoxBase class which is based on the Control class. Below is the Figure 3.15 of a Checkbox.





















                                                         Figure 3.15:  CheckBox.

                          3.4.5.1 Notable Properties
                          Important properties of the CheckBox in the Appearance section of the properties window are:
                          Appearance: Default value is Normal. Set the value to Button if you want the CheckBox to be
                          displayed as a Button.


                          54                     LOVELY PROFESSIONAL UNIVERSITY
   55   56   57   58   59   60   61   62   63   64   65