简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM