Hi!
Is there any possibility to know when the size of a component has changed?
I'm trying to make my own button component and I need to know when the size of a button has changed. (I’m putting a picture on the button and I have to scale the picture to fit the button if its size has changed). I have derived my component from TButton.
Another solution it would be to change the way of how the Width and Height stores their values. But I don't know if it is possible to extend the Width and Height properties write procedures. Something like inheriting their behavior and adding some new actions.
For the moment I'm scaling the button's image each time when I draw the button, but I would like to do it only when the button's size has changed.
Is there any possibility to know when the size of a component has changed?
I'm trying to make my own button component and I need to know when the size of a button has changed. (I’m putting a picture on the button and I have to scale the picture to fit the button if its size has changed). I have derived my component from TButton.
Another solution it would be to change the way of how the Width and Height stores their values. But I don't know if it is possible to extend the Width and Height properties write procedures. Something like inheriting their behavior and adding some new actions.
For the moment I'm scaling the button's image each time when I draw the button, but I would like to do it only when the button's size has changed.