How to Populate an Option Group With Check Boxes Using Visual Basic
- 1). Open either Visual Basic Express or Visual Studio.NET. If you have a specific project you are already working on, open your current project. If you do not, you will need to have at least a blank form to ready to work on, within the developer environment.
- 2). Click on "Create," next to the word "Project" in the upper-left panel of the screen.
- 3). Choose "Windows Form Application" from the icon choices. Type the name of your project in the "Name" box located below this and hit "OK." The screen changes, and a blank form appears in the middle.
- 4). Navigate to the top menu of "File," "Edit," "View," "Project" and more. Click on "View" and scroll down to choose "Tool Box." A third panel will appear on the left-hand side of the screen.
- 5). Expand "All Windows Forms" by clicking on the "+" sign to the left of the tool box. Scroll down and click on "GroupBox." Hold the mouse button down and drag the group box over to the blank form. Release the mouse button.
- 6). Navigate back to the toolbox and click on "CheckBox." Drag it over to the group box and place it inside the group box. Let go of the mouse button. You can reposition each check box by clicking and dragging it where it needs to be.
- 7). Rename the text of the group box and check boxes by clicking on each item one at a time. With each item, click on the "Properties" tab in the lower right-hand screen. Scroll down to view the "Text" field. Place the cursor in the box next the word "Text" and use the "Backspace" button on your keyboard to erase the default name. Retype whatever text you want to appear instead. Hit "Enter" when you are finished, or simply click on the next item you need to change. The developer environment will update the text for you. For example, the group box could be labeled "Colors," and each check box could get the name of a different color, such as "Yellow," "Red" and so on.
- 8). Press the "F5" key on your keyboard to run a sample of your application. Test your check boxes by clicking in them. A check box will appear in each one, as you click them. You've successfully populated check boxes in a group or option box.
- 9). Click the red "X" in the upper right-hand corner to return to the developer environment. Click "File" from the menu choices and then "Save All Files." Close the developer environment when you are finished.
Source...