I've written a custom tab control (FooTabControl
) which hosts specific tab page controls (FooTabPage
instances). The FooTabPage
s 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 FooTabPage
s as he sees fit).
What would be the proper way to implement this?
-
You need to override CreateControlsInstance (in the custom control) and return you own implementation of ControlCollection.
In your implementation your will override Remove to disallow removing the Panel.From Shay Erlichmen
0 comments:
Post a Comment