Setup a GroupBox

This exercise describes how to add a GroupBox to a form:

  1. Click and drag a GroupBox from the Toolbox to the Design Sheet:
  2. Resize

    Click and drag the corners of the control to resize the control.

    Reposition

    Click and drag the handle (top-left) to reposition the control.

  1. To move a control (from outside the GroupBox or from the Toolbox) into the GroupBox, click and drag the control over the Grid container of the GroupBox with the mouse.
  2. To drag and drop a control inside rather than over a container in the Design Sheet, press and hold down the ALT key as you release the mouse. Alternatively, in the Form Explorer, click and drag a control which is outside a container, and drag and drop it inside the container (in the hierarchy of controls).

    Note: You can also drag and drop a control from the Design Sheet and drop it onto the Form Explorer so that it is inside the container.

  1. Repeat Step 2 until you have added all the controls you want to group:
  2. The controls you have added to the GroupBox will look like this in the Form Explorer:
  3. Note that you can use the mouse to move controls in and out or between container controls in the Form Explorer.

  4. Save your changes and click Run to run the form:

The form shows the controls you have added inside the GroupBox: