-
Mar 5th, 2021, 02:20 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Possible to create a custom control made from several controls?
I know how to create custom controls using "Inherits" and extending that single control to add or change functionality. I also know how to add controls at run time. What I am wondering though, is it possible to create a single control that is comprised of multiple controls (a GroupBox containing a TextBox, two Labels, and three small Images, all with preset positions), so that rather than having to add 7 controls individually at run time, I can just add the custom GroupBox and all of the rest are automatically added and positioned? If so, how?
-
Mar 5th, 2021, 02:33 PM
#2
Re: Possible to create a custom control made from several controls?
What you want is a User Control, which you can add via the Project menu.
You can position controls (and write code) as if it is a form, and then when you Build the project it will be added to the Toolbox so that you can put it on forms.
-
Mar 5th, 2021, 05:50 PM
#3
Thread Starter
Hyperactive Member
Re: Possible to create a custom control made from several controls?
Originally Posted by si_the_geek
What you want is a User Control, which you can add via the Project menu.
You can position controls (and write code) as if it is a form, and then when you Build the project it will be added to the Toolbox so that you can put it on forms.
Thank you, that was exactly what I needed. Never used that before. Learn something new everyday.
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
|