Creating Copies of a set of controls

Hi Experts,

I have a panel containing a set of controls which i would like to replicate at runtime.

How could i declare the panel as a type so i could quite easily create a new copy of it?

Cheers,

Tom

LVL 3
TommyTwoPintsAsked:
Who is Participating?
 
Jeff CertainConnect With a Mentor Commented:
Simply create a user control and put all the functionality there.

Then, instead of instantianting the panel and all the associated controls, you simply instantiate the user control.
0
 
TommyTwoPintsAuthor Commented:
Excellent,

Thanks alot!
0
 
Jeff CertainCommented:
Glad to help.

Just a word... you want to include only the controls, and not the panel, in the user control. You can still drop this set of controls in a panel for layout purposes, if required.

0
 
TommyTwoPintsAuthor Commented:
Great; I will be using the panel for the title bar.
This particular set for controls is a project template for my application.
Good to know though.

Thanks again,

Tom
0
All Courses

From novice to tech pro — start learning today.