TppCusteomRegion.UpdateChildControls should be virtual
Hi,
We have created our own TppRegion descendant, which resizes its objects according
to some specific rules when the region is resized.
So what i want to do is intercept the default way that a TppRegion tells
its children to resize, and replace that with my own single procedure that
resizes and shifts all children of our new Region-component.
As far as I can see, the best way to do this is to override the UpdateChildControls
method of TppCustomregion ...... but alas, that one is not virtual!
Can you make this one virtual in the next release, or provide me with another
hook to implement this?
thanks
Bas
We have created our own TppRegion descendant, which resizes its objects according
to some specific rules when the region is resized.
So what i want to do is intercept the default way that a TppRegion tells
its children to resize, and replace that with my own single procedure that
resizes and shifts all children of our new Region-component.
As far as I can see, the best way to do this is to override the UpdateChildControls
method of TppCustomregion ...... but alas, that one is not virtual!
Can you make this one virtual in the next release, or provide me with another
hook to implement this?
thanks
Bas
This discussion has been closed.
Comments
It looks as though the UpdateChildControlBounds is called by the
BoundsChange routine which is virtual. You could override this method
and perhaps call your own version of UpdateChildControlBounds instead.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
thans for the tip, but the UpdateChildControls is called in more places then
BoundsChange....
But for an intermediate version it may be the best way to go
Besides, I just realized I have to call the inherited BoundsChange to propagate
the call upwards in the Classhierarchy (as TppCustomRegion.BoundsChange does.
But the inherited call will call UpdateChildControls again ....
the next release.
The current workaround would be to have your custom region descend from
TppStretchable rather than TppCustomRegion to give you full control.
You would then need to copy over any of the necessary code for it to
function correctly.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks!
And while you're at it .. could you also make TppComponent.ParentBoundsChange
virtual ?
thanks
I will make this change as well.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com