|
September 4, 2002 Creating Docking Windows Tips: September 2002
Yehuda Shiran, Ph.D.
|
|
Many applications build their user interfaces with dockable windows. The advantage of dockable windows is that you can control the size of each window, while the container window prevents them from cluttering each other. You can achieve the effect of docking using either the Dock or Anchor property of the Panel class.Let's look at an example where we use a Windows form to create three dockable panels on the bottom, top, and left sides of the container panel. Here is the definition of the container panel:
Here is the definition of the left panel. It is docked with the Dock property, and it also has a 3D-style border:
We define the top panel in a similar way, using the Anchor property for docking:
We define the third panel as follows:
We need to add the three panels to the base panel:
To learn more about JScript .NET and ASP.NET, go to Column 117, JScript .NET, Part XI: Creating Windows Forms.
People who read this tip also read these tips: Look for similar tips by subject: |
| ||||||||||||||||||||