Set the Opacity of a Button Background

Scott Rossi scott at tactilemedia.com
Tue Mar 1 16:24:40 EST 2016


Another option similar to Randy's is to create an image tile -- for
example, a 48x48 white PNG that's 50% opaque -- and assign this as the
backPattern of the button.  Using this method you can scale the button to
any size and the translucency will fill accordingly.  You can also assign
a separate icon if desired.

Unless you REALLY need the properties of a button control, you can also
consider other objects to act as buttons, such as graphics, where you can
employ a translucent gradient fill to the control, or fields, where you
can create the effect of a label that has multiple text styles.  There are
several options for create button-style controls.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 3/1/16, 12:20 PM, "use-livecode on behalf of Randy Hengst"
<use-livecode-bounces at lists.runrev.com on behalf of iowahengst at mac.com>
wrote:

>It sounds to me that you want the color of the button to be 50% Š meaning
>that the card (or whatever) below it will show though. And, you want the
>border and name of button to be opaqueŠ if all that is correct, you might
>want to give this a try.
>
>create an image in the color you want the button background to be Š
>perhaps white (you can do that within LC with import snapshot). Then
>assign that image as the icon for the button (you¹ll have to fiddle with
>sizing the image). Set the iconGravity of the button to ³center². Then
>adjust the blendLevel of the image and you¹ll see that reflected in the
>button¹s background.
>
>If you just set the blendLevel of the button, then the name and border
>will also change opacity.
>
>be well,
>randy
>
>Randy Hengst
>www.classroomFocusedSoftware.com
>
>
>> On Mar 1, 2016, at 1:25 PM, Sannyasin Brahmanathaswami
>><brahma at hindu.org> wrote:
>> 
>> We looking at very simple button design:
>> 
>> 1)  Border color is on/white/2px
>> 2)  background is set to clear (no color assignment and no icon)
>> 3)  background opacity set to 50% # if we can figure out how....
>> 4)  Button name/label white
>> 






More information about the use-livecode mailing list