Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Creating Copies of a set of controls

Posted on 2006-07-09
4
Medium Priority
?
182 Views
Last Modified: 2010-04-23
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

0
Comment
Question by:TommyTwoPints
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 24

Accepted Solution

by:
Jeff Certain earned 2000 total points
ID: 17075448
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
 
LVL 3

Author Comment

by:TommyTwoPints
ID: 17075521
Excellent,

Thanks alot!
0
 
LVL 24

Expert Comment

by:Jeff Certain
ID: 17075672
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
 
LVL 3

Author Comment

by:TommyTwoPints
ID: 17075705
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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question