0% found this document useful (0 votes)
101 views

Example: Group Box Control

The GroupBox control displays a frame around related controls to logically group them. It can contain other controls and be moved as a unit. CheckBoxes allow users to select true/false options and have checked, unchecked, and indeterminate states to select or deselect an option. An example uses checkboxes in a groupbox to select how a user learned about an organization, with a textbox to specify if "other" is selected.

Uploaded by

ARVIND H
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

Example: Group Box Control

The GroupBox control displays a frame around related controls to logically group them. It can contain other controls and be moved as a unit. CheckBoxes allow users to select true/false options and have checked, unchecked, and indeterminate states to select or deselect an option. An example uses checkboxes in a groupbox to select how a user learned about an organization, with a textbox to specify if "other" is selected.

Uploaded by

ARVIND H
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Group Box Control:

The GroupBox displays a frame around a group of controls with or without a caption. Use
a GroupBox to logically group a collection of controls on a form. The group box is a
container control that can be used to define groups of controls.

Windows Forms GroupBox controls are used to group other controls. There are three reasons
to group controls:

 To create a visual grouping of related form elements for a clear user interface.
 To create programmatic grouping (of radio buttons, for example).
 For moving the controls as a unit at design time.

Example
In this example, let us add four check boxes in a group box. The check boxes will allow the
users to choose the source from which they came to know about the organization. If the user
chooses the check box with text "others", then the user is asked to specify and a text box is
provided to give input. When the user clicks the Submit button, he/she gets an appropriate
message.
The form in design view
CheckBox Control:
The CheckBox control allows the user to set true/false or yes/no type options. The user can
select or deselect it. When a check box is selected it has the value True, and when it is cleared,
it holds the value False.
Let's create two check boxes by dragging CheckBox controls from the Toolbox and dropping
on the form
The CheckBox control has three states, checked, unchecked and indeterminate. In the
indeterminate state, the check box is grayed out. To enable the indeterminate state,
the ThreeState property of the check box is set to be True.

You might also like