| Mark Olbert 2007-01-31, 4:13 am |
| Okay, it turns out it's so simple I missed it: clear the Controls collection, set ChildControlsCreated to false and call
EnsureChildControls(). Although, for some reason, if you clear the Controls collection while ChildControlsCreated is false,
CreateChildControls() gets called automatically on the Clear()...which means it gets called twice. So you have to test the state of
ChildControlsCreated first.
- Mark
On Tue, 30 Jan 2007 17:57:10 -0800, Mark Olbert <ChairmanMAO@newsgroups.nospam> wrote:
>I've written a composite custom control which I would like to have update its design-time display when one of several properties
>changes at design time. These custom properties are not simply the exposed properties of the constituent controls (e.g., they
>control how many constitutent controls are displayed).
>
>I am at a loss as to how to go about doing this. I have a custom designer for the control, but I don't see any functionality in the
>base class (ControlDesigner) to "monitor" property changes and then alert the DesignerHost that the control needs to be redrawn.
>
>I am also as to why I've just spent 2 hours trying to find references to solving this problem on google, with no
>joy...since it seems like it would be a very common problem :). But that's another story.
>
>Any leads or references would be appreciated!
>
>- Mark
|