How create a form with 4 panels in the same area
-
I've a form 400x300. At the start it show a panel (panel1) with its contein. When i click on OK button it hide the first panel and shows the second one (panel2) and so on since to panel4. Now in design mode how can i implement this functionality? If i insert a panel and i add its contein how can i add the second one? If i add it over the first one, how can i get access at the first one to add a new textbox for example?
-
I've a form 400x300. At the start it show a panel (panel1) with its contein. When i click on OK button it hide the first panel and shows the second one (panel2) and so on since to panel4. Now in design mode how can i implement this functionality? If i insert a panel and i add its contein how can i add the second one? If i add it over the first one, how can i get access at the first one to add a new textbox for example?
You can programatically create and control panels on the form. Simply create and dispose of a panel once you have finished with it. Create a new panel control and assign it its dimensions and location within the form.
-
You can programatically create and control panels on the form. Simply create and dispose of a panel once you have finished with it. Create a new panel control and assign it its dimensions and location within the form.
-
I've a form 400x300. At the start it show a panel (panel1) with its contein. When i click on OK button it hide the first panel and shows the second one (panel2) and so on since to panel4. Now in design mode how can i implement this functionality? If i insert a panel and i add its contein how can i add the second one? If i add it over the first one, how can i get access at the first one to add a new textbox for example?
-
yes but new panel hide the others above, so if i need to work with the first one i can't whether i delete the others over.
Make a very big form so you can have all 4 panels side by side. And in the constructor resize the form to only have the first panel visible, and when you need to use another panel, move it to the position of the first panel. -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!
-
You can programatically create and control panels on the form. Simply create and dispose of a panel once you have finished with it. Create a new panel control and assign it its dimensions and location within the form.
I think that you misunderstood the question. I happen to have the same question. What I'm looking for is a mechanism to create panels with controls at design time and flip through them (ala wizard) at runtime. The pain about using panels by themselves is that it's very difficult to overlay them at design time as the designer wants to keep inserting the topmost panel into the panel in the next layer. It's a mess. The only solution I have found thus far is to create the panels in different locations and then create them at runtime, locating them where needed. It would be very nice to have a TabControl-like container control to assist with this. I myself would use a TabControl, but there's no current mechanism in place that I know of to remove the tabs. (.Net 2.0 - Whidbey Beta 1) If anyone can direct me to a resource for such a control, I'd be much obliged. Thanks, Bob Briggs