By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,238 Members | 1,837 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,238 IT Pros & Developers. It's quick & easy.

Visual Inheritence, UserControl and SplitContainer

P: n/a
Hi all!

I made a UserControl with a SplitContainer in it. I put some controls
in the SplitContainer.Panel1. After that, I created a new UserControl
which inherit from the previously created UserControl. So far, so
good... I can see the SplitContainer in the new UserControl.

However, I have a problem. I can't add a control in the Panel2 of the
SplitContainer of the UserControl which inherit from the UserControl
with the SplitContainer in it. The SplitContainer and the Panel2 seem
to be locked. How to unlock them?

Thanks for your help!

Jan 6 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
YOu cannot reference PAnel 2 of SplitContainer of the parent control Directly
in the inherited control. Becuase the Parent Control now itself behaves like
a single entity.
I dont know if its possible to do in design view or not but you can expose
Panel2 as a property of the Parent Control to be Public and then add
controls to the exposed PAnel instance.
I hope this will work.
Best Regards,
Rizwan aka RizwanSharp

"Martin" wrote:
Hi all!

I made a UserControl with a SplitContainer in it. I put some controls
in the SplitContainer.Panel1. After that, I created a new UserControl
which inherit from the previously created UserControl. So far, so
good... I can see the SplitContainer in the new UserControl.

However, I have a problem. I can't add a control in the Panel2 of the
SplitContainer of the UserControl which inherit from the UserControl
with the SplitContainer in it. The SplitContainer and the Panel2 seem
to be locked. How to unlock them?

Thanks for your help!

Jan 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.