Controls

rectangle around the group of controls that you want to move together. When you release the mouse button, all the controls will be selected. (You can also select more than one control by holding down the Shift key while clicking each of the controls you want to select— don't just read it, try it now!) To move the selected group of controls to another position on the form, click within the selected area and drag the mouse to the desired position.

4. Adding a list box:

■ Click the ListBox control in the Toolbox. The mouse pointer will change to a cross accompanied by the symbol of the selected control. Click below the Main Interest frame, and drag the mouse down and to the right to draw a list box. When you release the mouse button, you will see a white rectangle.

Figure 10-11 shows the list box populated with Hardware entries. In a later section of this hands-on project, you will learn how to display appropriate lists of items in a list box.

5. Adding a frame with option buttons:

■ Follow step 2 above to insert a frame below the list box that you added in step 4. Change the frame's Caption property to Gender. Add two option buttons inside this frame, and change the first button's Caption property to Male and the second one to Female. See Figure 10-11.

6. Adding a frame with check boxes:

■ Click the Frame control in the Toolbox and draw a rectangle to the right of the frame labeled Main Interest.

■ Change the Caption property of the new frame to Computer Type.

■ Click the CheckBox button in the Toolbox, and click inside the empty frame that you have just added. The CheckBox1 control should appear inside the frame.

■ Change the Caption property of the CheckBox1 control to IBM/Compatible.

■ Place two more check boxes inside the frame labeled Computer Type. Use the Caption property to assign the following new titles to these check boxes: Notebook/Laptop and Macintosh. The final result should match Figure 10-11.

Unlike option buttons that are mutually exclusive, check boxes allow the user to activate one or more options simultaneously. The check box can be checked, unchecked, or unavailable at a particular time. The unavailable check box has its label grayed out and is therefore inactive (cannot be selected). The checked box has an x in front of its caption. The check box that has the focus is indicated by a dotted line around the caption.

0 0

Post a comment