Hello,
A simple, yet annoying one....
I have made a new GroupBox in that contains all my controls (buttons, listboxes, textboxes, etc.).
I wish now to delete the GroupBox which I find impossible.
Whenever I try to delete it, it deletes all its contents.
I have tried to directly delete it by 'delete', I tried by removing its code, I tried shrinking it, but nothing seems to help.
Does anyone know how to get rid of this GroupBox while keeping all its controls?
Thanks,
Sam
Loading
Kirtan PatelPosted Jan 12, 2010, 8:50 AM
I know how to remove it without affecting all controls inside it .its some complected process but it can be done
just Attach Your Project Files(zip) Here .
SamPosted Jan 12, 2010, 1:08 PM
Perfect and detaild reply.
It was not easy (I have over 80 controls in the form!(, but with your explanation it was perfect.
Thanks.
Kirtan PatelPosted Jan 12, 2010, 12:23 PM
please check "Do you like this answer" check box it helps me :)
For Example Below is My Form
Step 1 :
--------------
Go to Designer Code :
Remove Below Code as Mentioned in below image
Step 2
--------------
Now you will have code like below after deleting Some code in Step1
Step 3:
----------
Delete all other code lines with word "GroupBox1". you can do this easily by find Feature of Visual studio to locate lines
This below Final result : I have Removed Group Box Without Affecting Control Positions :
SamPosted Jan 12, 2010, 9:48 AM
Thanks for replying.
Unfortunately my code is very large, and I guess you need the whole project (with the Designer file).
I therefore prepared a minimal form with one button and one GroupBox, and I hope you can demonstrate the removal on that demo.
Thanks in advance,
Sam