سؤال

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