Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with custom component 1

Status
Not open for further replies.

tolemac

Programmer
May 4, 2003
8
RO
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.
 
hi,

Go to jedi.org and download the complete free 250 components. In the package there is a TjvImageButton doing exactly what you want.

Steph [Bigglasses}
 
Hi,
I think that overriding the Resize method is what I need.
Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top