문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top