Files
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

2.7 KiB

title, ms.date, f1_keywords, helpviewer_keywords, ms.assetid
title ms.date f1_keywords helpviewer_keywords ms.assetid
Panel Control Overview 03/30/2017
Panel
grouping controls [Windows Forms], Panel control
Panel control [Windows Forms], about Panel control
b6b83636-2c39-4dad-89d6-f0fa41049a74

Panel Control Overview (Windows Forms)

Windows Forms xref:System.Windows.Forms.Panel controls are used to provide an identifiable grouping for other controls. Typically, you use panels to subdivide a form by function. For example, you may have an order form that specifies mailing options such as which overnight carrier to use. Grouping all options in a panel gives the user a logical visual cue. At design time all the controls can be moved easily — when you move the xref:System.Windows.Forms.Panel control, all its contained controls move, too. The controls grouped in a panel can be accessed through its xref:System.Windows.Forms.Control.Controls%2A property. This property returns a collection of xref:System.Windows.Forms.Control instances, so you will typically need to cast a control retrieved this way to its specific type.

Panel Versus GroupBox

The xref:System.Windows.Forms.Panel control is similar to the xref:System.Windows.Forms.GroupBox control; however, only the xref:System.Windows.Forms.Panel control can have scroll bars, and only the xref:System.Windows.Forms.GroupBox control displays a caption.

Key Properties

To display scroll bars, set the xref:System.Windows.Forms.ScrollableControl.AutoScroll%2A property to true. You can also customize the appearance of the panel by setting the xref:System.Windows.Forms.Control.BackColor%2A, xref:System.Windows.Forms.Control.BackgroundImage%2A, and xref:System.Windows.Forms.Panel.BorderStyle%2A properties. For more information on the xref:System.Windows.Forms.Control.BackColor%2A and xref:System.Windows.Forms.Control.BackgroundImage%2A properties, see How to: Set the Background of a Panel. The xref:System.Windows.Forms.Panel.BorderStyle%2A property determines if the panel is outlined with no visible border (xref:System.Windows.Forms.BorderStyle.None), a plain line (xref:System.Windows.Forms.BorderStyle.FixedSingle), or a shadowed line (xref:System.Windows.Forms.BorderStyle.Fixed3D).

See also