Click to Rate and Give Feedback

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Windows Forms Programming
Panel Control Overview (Windows Forms)

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 Panel control, all its contained controls move, too. The controls grouped in a panel can be accessed through its Controls property. This property returns a collection of Control instances, so you will typically need to cast a control retrieved this way to its specific type.

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

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

Reference

Other Resources

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker