V
Vincent Scheel
Hello everyone,
I've build a CompositeControl (a photogallery) which has a few
properties (number of rows, number of columns). The control has a
designer which extends the ControlDesigner class. Everything goes well,
but when I change the properties designtime, the control doesn't change
right away. When i switch to source and back to designview the control
does change and uses the new properties.
When I debug the control, I can tell the CreateChildControls method
doesn't fire again, and so the changes can't be noticed. As a test I
solved it by adding a SetChildControlsCreatedFalse() method to the
control (which set the ChildControlsCreated to false) and I called this
method from the ComponentChanged() method of the designer. That works,
but is not a nice way of doing it. Is there a nice way of doing that? I
heard something about using the IControlDesignerAccessor interface, but
i'm not sure how to do that. I also tried implementing the
ICompositeControlDesignerAccessor.RecreateChildControls() method, but
it doens't fire at all.
I hope someone can help me out,
Kind regards
Vincent Scheel
The Netherlands
I've build a CompositeControl (a photogallery) which has a few
properties (number of rows, number of columns). The control has a
designer which extends the ControlDesigner class. Everything goes well,
but when I change the properties designtime, the control doesn't change
right away. When i switch to source and back to designview the control
does change and uses the new properties.
When I debug the control, I can tell the CreateChildControls method
doesn't fire again, and so the changes can't be noticed. As a test I
solved it by adding a SetChildControlsCreatedFalse() method to the
control (which set the ChildControlsCreated to false) and I called this
method from the ComponentChanged() method of the designer. That works,
but is not a nice way of doing it. Is there a nice way of doing that? I
heard something about using the IControlDesignerAccessor interface, but
i'm not sure how to do that. I also tried implementing the
ICompositeControlDesignerAccessor.RecreateChildControls() method, but
it doens't fire at all.
I hope someone can help me out,
Kind regards
Vincent Scheel
The Netherlands