Thursday, February 10, 2011

Creating a WinForms custom container control with some non-removable controls

I've written a custom tab control (FooTabControl) which hosts specific tab page controls (FooTabPage instances). The FooTabPages know to place themselves into a dedicated area within the FooTabControl.

Now I wish to have the FooTabControl also host a System.Windows.Forms.Panel child control (in another dedicated area of the FooTabControl). I want the user to be able to place his controls into this Panel, but disallow him from removing the Panel control itself (while still being able to add and remove FooTabPages as he sees fit).

What would be the proper way to implement this?

0 comments:

Post a Comment