michaelrawi Posted August 11, 2006 Posted August 11, 2006 Greetings How can I make a user control that can act as a container ? Can I see a simple sample (you can post a link if you like) Thanks in advance. Quote
Cags Posted August 11, 2006 Posted August 11, 2006 What exactly do you mean by a control that can act as a container? I would assume by this you want a control that can be used at design time similar to a panel? I've never tried it, but I would suggest writing a control that inherits ContainerControl. Quote Anybody looking for a graduate programmer (Midlands, England)?
Leaders snarfblam Posted August 11, 2006 Leaders Posted August 11, 2006 Visual Studio does not provide a designer for ContainerControl inheritors. You need to tag your UserControl as a parent control so that the Windows Forms Designer knows your intent to use it as such. How to make a UserControl object behave as a Design-Time control container by using Visual Basic .NET or Visual Basic 2005 Quote [sIGPIC]e[/sIGPIC]
michaelrawi Posted August 14, 2006 Author Posted August 14, 2006 Yes. I want to make a user control like a panel control. Ok, I've looked up the MSDN article. I'm going to try it. Thanks everyone :) Quote
Grasshopper-NET Posted August 15, 2006 Posted August 15, 2006 This thread was really helpful. I was just having the same idea and thought let me check the boards. Vola! Here it is. Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.