Panel Mutiview? - Best Practice!!

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2009
Posts: 15
Reputation: TinoMclaren is an unknown quantity at this point 
Solved Threads: 0
TinoMclaren TinoMclaren is offline Offline
Newbie Poster

Panel Mutiview? - Best Practice!!

 
0
  #1
Sep 30th, 2009
Hello All:

In asp.net there is a Multiview control which allows me to switch between panels programatically, so different sets of controls can selectively be displayed in the same area on screen.

I understand there is no such control in winForms but is there a best practice or technique for acheiving a similar operation?

Many thanks

Tino
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 331
Reputation: Ryshad has a spectacular aura about Ryshad has a spectacular aura about 
Solved Threads: 61
Ryshad's Avatar
Ryshad Ryshad is offline Offline
Posting Whiz

Re: Panel Mutiview? - Best Practice!!

 
0
  #2
Sep 30th, 2009
Depending on how you want them to appear visually, i usually use a TabControl if i want different sets of controls that the user can switch between.
If i want to change them in code in response to input then i normally design each of the panels, then place them one on top of the other and set all of them to .visible=false; .enabled = false; except for the one i want to be visible currently.

Not sure this is the 'best practice' but its always worked for me :p
Please don't take for granted the work that solvers do for you. Take the time to fully understand the code they give you so that you might adapt it to future problems.

"Learning is more than absorbing facts, it is acquiring understanding.” - William Arthur Ward
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 15
Reputation: TinoMclaren is an unknown quantity at this point 
Solved Threads: 0
TinoMclaren TinoMclaren is offline Offline
Newbie Poster

Re: Panel Mutiview? - Best Practice!!

 
0
  #3
Sep 30th, 2009
Thanks again Ryshad

Thats how I was going to do it (layerd panels) but wasnt sure if there was a better way.

Also looks like a bit of a mess on screen in VS, not easy to make alterations unless there is a way of disabling a panel on screen in VS too? Dont think so tho :-(

Many thanks for the help

Tino
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 331
Reputation: Ryshad has a spectacular aura about Ryshad has a spectacular aura about 
Solved Threads: 61
Ryshad's Avatar
Ryshad Ryshad is offline Offline
Posting Whiz

Re: Panel Mutiview? - Best Practice!!

 
0
  #4
Sep 30th, 2009
I agree, designing them this way is a nightmare.
One option ive found is to lay them out side by side when im designing then set their location properties to all be the same when im done..either manually in the designer (edit the property rather than dragging them as you will probably end up with panels in panels if you drag them) or in the form load set their locations.

There may well be a better method, if there is i'd be keen to know it too :p I've always leaned more toward the TabControl since its neat and easy to use :p
Please don't take for granted the work that solvers do for you. Take the time to fully understand the code they give you so that you might adapt it to future problems.

"Learning is more than absorbing facts, it is acquiring understanding.” - William Arthur Ward
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 15
Reputation: TinoMclaren is an unknown quantity at this point 
Solved Threads: 0
TinoMclaren TinoMclaren is offline Offline
Newbie Poster

Re: Panel Mutiview? - Best Practice!!

 
0
  #5
Sep 30th, 2009
Originally Posted by Ryshad View Post
One option ive found is to lay them out side by side when im designing then set their location properties to all be the same when im done..either manually in the designer (edit the property rather than dragging them as you will probably end up with panels in panels if you drag them) or in the form load set their locations.
Thanks for the tip - ill use that
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC