|
Hi guys, I'm creating a GUI for an educational program originally written using the FOX toolkit. I'm re-creating it in Visual Studio but hit a small snag. The Fox program had a menu strip at the top, one button for editing a list of teachers, one for editing a list of students, and one for editing problem sets. Underneath the menu strip were several panels. Each panel either held controls for editing teachers, students, or problems. With Fox, when a user clicked on one of the buttons, all of the panels hid except for the desired one, showing only the desired controls. Now, Fox doesn't have a visual designer like .NET (At least none that I know of), so hiding panels was an easy trick. I could put everything on just one screen. But, my question is-what's a good way to imitate this with the .NET GUI designer? Can this be done with the form designer, or should I stick to using panels? Or might there be another way? | | emf2718 Wednesday, April 08, 2009 12:10 AM | Hi , Visual studio allows the user to design their forms very easily. Using lot of properties like Docking,Anchoring, setting margin values. There are some content controls like GroupBox, Panels etc. Using large number of panels is easy by tricking hiding and showing. This will be useful only when you are having small number of panels. If your requirements is having large number of panels means you can just add number of Forms as you wish. Because adding large number of panels wil lead to the maintainence problem in future enchancement in design time. So better to choose Adding number of forms in your application. So please try adding forms and use Docking ,Anchoring and fromatting etc.. Happy Coding! Regards, Jayakumar Natarjan- Marked As Answer byBruce.ZhouMSFT, ModeratorMonday, April 13, 2009 8:03 AM
-
| | Jayakumar Nataraj Wednesday, April 08, 2009 10:57 AM | Hi emf2718, Based on my experience, you also take advantage of the TabControl in .NET Framework. At design time, you can easy manage all of the tabpanels. At run time, you can hide the tab headers, and write code to control which tabpage should be currently shown. As how to retain TabPage headers at design time, and hide it at run time. You can refer to our FAQ for detail code. Best regards, Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't. - Marked As Answer byBruce.ZhouMSFT, ModeratorMonday, April 13, 2009 8:03 AM
-
| | Bruce.Zhou Thursday, April 09, 2009 3:35 AM | If TabControl is not exactly what you want... You could also use UserControls. These can be designed seperately so that stacked controls at design time does not become an issue. You can then add/remove them in response to a button click.
Mick Doherty
http://dotnetrix.co.uk- Marked As Answer byBruce.ZhouMSFT, ModeratorMonday, April 13, 2009 8:03 AM
-
| | Mick Doherty Thursday, April 09, 2009 7:29 PM | Hi , Visual studio allows the user to design their forms very easily. Using lot of properties like Docking,Anchoring, setting margin values. There are some content controls like GroupBox, Panels etc. Using large number of panels is easy by tricking hiding and showing. This will be useful only when you are having small number of panels. If your requirements is having large number of panels means you can just add number of Forms as you wish. Because adding large number of panels wil lead to the maintainence problem in future enchancement in design time. So better to choose Adding number of forms in your application. So please try adding forms and use Docking ,Anchoring and fromatting etc.. Happy Coding! Regards, Jayakumar Natarjan- Marked As Answer byBruce.ZhouMSFT, ModeratorMonday, April 13, 2009 8:03 AM
-
| | Jayakumar Nataraj Wednesday, April 08, 2009 10:57 AM | I wish adding forms were an option. Everything needs to be on a single window-it's beyond my control really-so it looks like panels are the only way? There are, uh, 9 panels I think. I guess I can handle that if I code carefully enough. | | emf2718 Wednesday, April 08, 2009 8:29 PM | Hi emf2718, Based on my experience, you also take advantage of the TabControl in .NET Framework. At design time, you can easy manage all of the tabpanels. At run time, you can hide the tab headers, and write code to control which tabpage should be currently shown. As how to retain TabPage headers at design time, and hide it at run time. You can refer to our FAQ for detail code. Best regards, Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't. - Marked As Answer byBruce.ZhouMSFT, ModeratorMonday, April 13, 2009 8:03 AM
-
| | Bruce.Zhou Thursday, April 09, 2009 3:35 AM | Hi emf2718, Based on my experience, you also take advantage of the TabControl in .NET Framework. At design time, you can easy manage all of the tabpanels. At run time, you can hide the tab headers, and write code to control which tabpage should be currently shown. As how to retain TabPage headers at design time, and hide it at run time. You can refer to our FAQ for detail code. Best regards, Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
Thanks! | | emf2718 Thursday, April 09, 2009 3:07 PM | If TabControl is not exactly what you want... You could also use UserControls. These can be designed seperately so that stacked controls at design time does not become an issue. You can then add/remove them in response to a button click.
Mick Doherty
http://dotnetrix.co.uk- Marked As Answer byBruce.ZhouMSFT, ModeratorMonday, April 13, 2009 8:03 AM
-
| | Mick Doherty Thursday, April 09, 2009 7:29 PM |
|