Solved

Creating Copies of a set of controls

Posted on 2006-07-09
4
179 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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access/Visual Basic Question 3 48
Data organization issue 7 56
Open telerik datetime picker programmatically 13 42
How to call new form in VB2013? 4 35
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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