Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/how-to-group-controls-with-the-windows-forms-groupbox-control.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.5 KiB

title, description, ms.date, helpviewer_keywords, ms.assetid
title description ms.date helpviewer_keywords ms.assetid
Group Controls with GroupBox Control Learn how to group controls with the Windows Forms GroupBox control so that you can create a visual grouping of related elements. 03/30/2017
controls [Windows Forms], grouping
GroupBox control [Windows Forms], grouping controls
Windows Forms controls, grouping
0bda316d-bd2a-43aa-ac73-342453303169

How to: Group Controls with the Windows Forms GroupBox Control

Windows Forms xref:System.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.

To create a group of controls

  1. Draw a xref:System.Windows.Forms.GroupBox control on a form.

  2. Add other controls to the group box, drawing each inside the group box.

    If you have existing controls that you want to enclose in a group box, you can select all the controls, cut them to the Clipboard, select the xref:System.Windows.Forms.GroupBox control, and then paste them into the group box. You can also drag them into the group box.

  3. Set the xref:System.Windows.Forms.GroupBox.Text%2A property of the group box to an appropriate caption.

See also