Winston Posted July 4, 2006 Posted July 4, 2006 I'm writing a custom tab control. I'm inheriting from ContainerControl, the problem i'm facing is, during design time when u drag a Panel or any other control into the container, you can select the control inside the container, but when i add the control from within the class that dervies from ContainerControl. The controls cannot be selected during design time, is there any reason, how can i fix this? Thanks. Quote
Cags Posted July 4, 2006 Posted July 4, 2006 It might help if you post some code showing how your adding the controls from within the class. I can think of no inherent reason it wouldn't work, so it's perhaps the way your adding them. Quote Anybody looking for a graduate programmer (Midlands, England)?
Winston Posted July 4, 2006 Author Posted July 4, 2006 Well from within the container class, it's just simply this.Control.Add(panel1); panel1, is already defined, etc, just couldn't be bothered typing the rest of the code. The panel1 gets added fine, but when u drag the container control onto a form in design time, the panel1, cannot be selected from within the form. I've sort of figured out and noticed why, but i think the apparent reason is, the form itself has to create the panel and store it inside the form, and then pass just the reference of the panel to the control, well at least that's what i'm noticing from the TabControl. 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.