Beruflich Dokumente
Kultur Dokumente
Introduction:
Group Box. C# windows control that displays a frame around a group of controls with an
optional caption.
Figure 3.1 Windows form with Group Box, Check Box and Radio Button
Radio Button. Allows distinct selection of several items. In Groups of Radio Buttons, only one
can be selected (Checked). This gives an exclusive selection for variety of items.
Check Box. Functions almost the same with Radio Buttons except that using this controls you
can allow multiple selections at once.
7. You may change the name properties if each checked box, but for this activity we will use the
default name.
Working on Radio Button:
8. Now add Radio Button on the other Group and put the Year Level as Text property of each
Radiobutton.
9. Again you may change the Name Properties of each these Radio Button, but for our activity we
were going to use the default name.
Checked Properties
Selected (Boolean: TRUE)
Selected (Boolean: TRUE)
Checked Properties
Not Selected (Boolean: False)
Not Selected (Boolean: False)
In case of Check Box, if that certain checkbox is checked (selected) it returns a value of TRUE,
otherwise it returns FALSE. This goes the same with Radio Buttons.
11. Add a button just like in Fig. 3.4. Change its Name Property to btnExecute and Text property
to Execute.
3
EXERCISES:
Exercise 3.1. Create a C# Calculator that performs the selected operation on Radio buttons.
Exercise 3.2. Create a simple 5 Multiple Questions Exam that uses Checkbox for Choices. Choices
must contain at least 2 correct answers for each question. When the Button Check is clicked it
will check the answers for each question and compute the grade based on TIP grading system.
Exercise 3.3. Create a C# program that will ask the user with at least 4 questions about the attributes
of a super hero and presents whose super hero he/she based on the answers in the 4 questions.
You may change the subject. (E.g. from super heroes you may change it to, characters in DOTA,
gods and goddesses, animals or objects). Use Radio Buttons and Checkbox in the design of your
applications.
--------------------------------------------------------------------------------------------------------------------------------------Note on Exercises:
A.
B.
3.