Bug or Feature - Tranparent Buttons Non-Responsive

Sannyasin Brahmanathaswami brahma at hindu.org
Sun Sep 11 22:08:28 EDT 2016


Is it just me that thinks the ideal button should be responsive across it's whole rect regardless of the opacity status? That that should be the default/in the engine itself?

We discussed this issue before under the heading of "Grabbing Image with Transparent Mask" where the underlying challenge was the same.

and  I have adopted Scott's "hack" to make a button that works across whole rect by using this technique

"Use a graphic instead of a button. Apply a two color gradient to the
graphic of the same color (i.e. white to white).  Set the opacity of each
color stop of the gradient to 1%. Set the showName of the graphic to true
and set the label of the graphic to your text.

use case is an "info" button with the letter "I" which is a thin target for small finger tips.. what you want is the button to respond, even if the user doesn’t exactly touch the label/name.

and FYI… there is no label option exposed in the property inspector for graphics. it is available, since you can set it from the msg box… should I report that?  yes.. you can code for the cords of the mouse within your button, but that seems too much work for something that one expects to work out of the box:

Draw big button, enter single char label, uncheck opacity. click on button "oops.. what? nothing happens?"  later click on the label… only the it reacts?

IMHO this is a "gotcha" moment (= stuck/frustrated) for a newbie. Even I was stymied "what am I doing wrong?" until I reflected back on our Grab Me discussion.

BR





More information about the use-livecode mailing list