Panel

Panel marshal by reference, disposable

System. Windows .Forms (system. windows .forms.dll) class

This Control acts as a container for other controls. The usual reason for creating a Panel is to support a particular layout scheme. It also supports a BorderStyle .

Note that introducing a Panel starts to play havoc with the pseudotransparency supported by the framework (you will often see the background painted into the panel with (0,0) in client coordinates, rather than parent coordinates, which can cause trouble with panels inside group boxes, for example.

When you are creating your own classes, you should derive from UserControl rather than Panel . While the only superficial difference at this time is that you can set the BorderStyle of a Panel , a UserControl also offers design-time support.

 public class  Panel  : ScrollableControl {  // Public Constructors  public  Panel  ();  // Public Instance Properties  public BorderStyle  BorderStyle  {set; get; }    public bool  TabStop  {set; get; }  // overrides Control  public override string  Text  {set; get; }  // overrides Control   // Protected Instance Properties  protected override CreateParams  CreateParams  {get; }  // overrides ScrollableControl  protected override Size  DefaultSize  {get; }  // overrides Control   // Public Instance Methods  public override string  ToString  ();  // overrides System.ComponentModel.Component   // Protected Instance Methods  protected override void  OnResize  (EventArgs  eventargs  );  // overrides Control   // Events  public event KeyEventHandler  KeyDown  ;  // overrides Control  public event KeyPressEventHandler  KeyPress  ;  // overrides Control  public event KeyEventHandler  KeyUp  ;  // overrides Control  } 

Hierarchy

System.Object System.MarshalByRefObject System.ComponentModel.Component(System.ComponentModel.IComponen, System.IDisposable) Control(IOleContro, IOleObject , IOleInPlaceObject , IOleInPlaceActiveObject , IOleWindow , IViewObject , IViewObject2 , IPersist , IPersistStreamInit , IPersistPropertyBag , IPersistStorage , IQuickActivate , System.ComponentModel.ISynchronizeInvoke , IWin32Window) ScrollableControl Panel

Subclasses

TabPage , System.Windows.Forms.Design.ComponentEditorPage



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net