|
-
Apr 3rd, 2011, 06:51 AM
#1
Thread Starter
New Member
Creating new checkbox in groupbox + Saving changes
Hello,
I would like to use code to create a checkbox with default properties and place it at a certain position in a groupbox. For example, i would like to do this by pressing a button and that i can give in the name and tag by use of an imputbox.
Also, i have noticed that if something like this is done, these changes aren't permanent and don't apply to the designer nor the code in VB. Is there a way to let the newly created checkboxes appear in the designer? And what about permanently deleting checkboxes by pressing a button. With "Dispose()" it isn't deleted from the designer...
Thanks in advance.
Im2be
-
Apr 4th, 2011, 01:48 AM
#2
Re: Creating new checkbox in groupbox + Saving changes
Think about it. A car manufacturer has a design for a particular model. It makes lots and lots of cars of that model each year. If you buy one of those cars and remove the hub caps, does that mean that every car the manufacturer makes based on that model in the future will not have hub caps? What if you added a spoiler? Would every car they make have a spoiler from then on? The answers are, of course, no. Your situation is exactly the same. Your aren't creating a form object in the designer. You're creating a form class. At run time, you create an instance of that class. You can create as many instances as you like. Any change that you make to one of those instances will not affect any other instance, past, present or future. Any future instances that you create will be based on the original design, not copies of one particular object that you made changes to.
-
Apr 4th, 2011, 08:50 AM
#3
Re: Creating new checkbox in groupbox + Saving changes
You may be able to create an add-in to do what you want. But I do not quite follow you, I thought I was until I got to the "Dispose".
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|