user1970794
user1970794

Reputation: 263

Delphi TImage Over A TSpeedButton

I want to put a TButton or TSpeedButton over top of a TImage and make the button transparent so you can still click it, but you see the image rather than the button. I can't seem to get this to work though, I changed the TSpeedButton to transparent, but it didn't seem to do anything.

I also tried making Visible false for the button, but then it becomes unclickable. Is there a way to make a button invisible without losing its functionality?

Thanks.

Upvotes: 2

Views: 1008

Answers (1)

David Heffernan
David Heffernan

Reputation: 612993

You don't need a button. Delete it and handle the image's OnClick event instead.

If you need to know the point on the image that was clicked, call GetMessagePos from your event handler.

Upvotes: 6

Related Questions