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.

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";

        }

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Followers

Total Pageviews

Powered by Blogger.

- Copyright © 2013 DevStudent - Metrominimalist - Powered by Blogger - Designed by Johanes Djogan -