Click here to Skip to main content
15,902,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
New to c#.Is there a "right" way of selecting different user controls on a master form instead of using the .Hide(); and .Show(); method
Posted

1 solution

At some point, Hide and Show (or by using the Visible Property which has the same effect) is the only way, other than creating the controls on the fly and adding or removing them from the appropriate Controls list.

Generally though, I try to group them into containers such as panels, or tab pages, and control the visibility of the whole panel at a time.
 
Share this answer
 
Comments
Gerhard_Louis 24-Jun-12 12:26pm    
Thnx OriginalGriff.Much appreciated.I saw a different solution which the poster presumed would work.Got really frustrated as he "presumed" it work without actually trying it himself
OriginalGriff 25-Jun-12 1:06am    
:laugh:
I try to check and only post code if I can cut'n'paste from VS - it is annoying to try something and find it doesn't even compile!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900