- Back to Home »
- Windows Applications »
- GroupBox
Posted by :
Sudhir Chekuri
Wednesday, 17 February 2016
Displays a frame around the controls with an optional caption. The frame of the groupbox will be visible in the output.
Properties:
Text: The text that is displayed as the caption on groupbox control in output.
Steps to use a panel
Drag and drop a group box
Add controls inside it.
Arrange them relatively inside the group box.
Now you can arrange the group box in a form which brings all the controls inside it without any change in their relative distances of controls inside it.
Default Event: Enter which is fired when groupbox become active by using control inside it.
Properties:
Text: The text that is displayed as the caption on groupbox control in output.
Steps to use a panel
Drag and drop a group box
Add controls inside it.
Arrange them relatively inside the group box.
Now you can arrange the group box in a form which brings all the controls inside it without any change in their relative distances of controls inside it.
Default Event: Enter which is fired when groupbox become active by using control inside it.
Code to
change text of groupbox when user enters selects a textbox inside it
private void
groupBox1_Enter(object sender, EventArgs e)
{
//Place a textbox inside Groupbox
and click inside it
groupBox1.Text = "GroupBox
Text";
}