slownet Posted August 26, 2003 Posted August 26, 2003 Hi, I have an UI to show/hide some controls depending on different button events. Those controls are in different groups. Every group is at the same position of the form. I tried to use two groupBox controls and place them at the same position. I thought I could set groupBox1.Visible=false; groupBox2.Visible=true; to show groupBox2 and hide groupBox1. But as groupBox2 is automatically set as a subcontrol of groupBox1, all the area of those groupBox is blank! Could you please tell me how to show/hide controls for my case? Thanks in advance! Quote
tonofsteel Posted August 26, 2003 Posted August 26, 2003 Have you drawn one group box inside another, or have you dragged one group box into another? Try drawing them away from each other (same size) Then move groupbox1 where you want it Then manually enter the x and y values into group box 2 Then see if the code works Quote
slownet Posted August 27, 2003 Author Posted August 27, 2003 (edited) It works! Thanks! Before, I dropped the second groupBox from ToolBox into the same location of the first groupBox. So it seems VS.NET IDE treats the second groupBox as a child control of the first one. If I did the above process like before and I added many controls into them, then I want to seperate the two groupBox controls, which property of the second groupBox should I change to seperate them? Edited August 28, 2003 by slownet Quote
slownet Posted August 28, 2003 Author Posted August 28, 2003 Hi, Anybody has answer for the above question? Thanks. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.