How to set clickable area of flex button? I want the clickable area to be smaller than the image.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-04 11:52 AM - edited ‎2025-06-05 1:52 AM
I have a flex button. I have an image for released and an image for pressed.
The released image contains a drop shadow. The released image does not, but has a transparent boundary so the dimensions match.
I want the clickable area to be the button image excluding the shadow and transparent edge. I want to set this clickable area as a rectangle.
How do I do this?
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
Solved! Go to Solution.
- Labels:
-
TouchGFX Designer
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-05 1:58 AM - edited ‎2025-06-05 2:02 AM
I've found the solution.
- Create a box object with clicklistener enabled:
- draw it over the button over the area you don't want to be clickable.
- Set the alpha to 0.
The clickable area of the box overrules over the clickable area of the button. No need to implement a click event handler.
There is one limitation and that in order to cancel a click, by holding and sliding out of the button before releasing, you need to go outside the original area of the button.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-05 1:58 AM - edited ‎2025-06-05 2:02 AM
I've found the solution.
- Create a box object with clicklistener enabled:
- draw it over the button over the area you don't want to be clickable.
- Set the alpha to 0.
The clickable area of the box overrules over the clickable area of the button. No need to implement a click event handler.
There is one limitation and that in order to cancel a click, by holding and sliding out of the button before releasing, you need to go outside the original area of the button.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
