September 5, 2002 - Popping Up Docking Panels
September 5, 2002 Popping Up Docking Panels Tips: September 2002
Yehuda Shiran, Ph.D.
|
topPanel
, bottomPanel
, and leftPanel
, all confined to the container panel, basePanel
. We also showed you how to create the label label1
, the text box textbox1
, and the button button1
. We add the label to the left panel:
leftPanel.Controls.Add(label1);
We add the text box to the top panel:
topPanel.Controls.Add(textBox1);
And the button is assigned to the bottom panel:
bottomPanel.Controls.Add(button1);
Finally, we need to add the base panel to the Windows form:
this.Controls.Add(basePanel);
Suppose we call the package MultiplePanelResizeMe
, and the class is MultiplePanelForm
. We pop up the Windows form by calling Application.Run()
:
Application.Run(new MultiplePanelResizeMe.MultiplePanelForm());
You should get the following form:To learn more about JScript .NET and ASP.NET, go to Column 117, JScript .NET, Part XI: Creating Windows Forms.