Custom container control with limited container region

M

mnuckols

I am trying to create a custom container control for Windows Forms
using C#.NET 2.0. My problem is that I want only part of the control
to allow other controls to be placed on it at design time. A similar
example to what I'm trying to accomplish is a Tab Control. The tab
pages of a tab control allow child controls to be added to the page
region, but not to the tab. Does anyone know how to accomplish this?
 
N

Nicholas Paldino [.NET/C# MVP]

This is done through separate controls on the TabControl. The
TabControl has TabPage instances which it exposes which you can drop
controls on. You have to take the same approach, having a child control
which will be allowed to host controls, and then not allow it on the parent.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top