Gradients on buttons?

Scott Rossi scott at tactilemedia.com
Wed May 11 05:43:53 EDT 2011


Keith:

To me, it seems like you're talking about two different things here.  To
create custom roundrect buttons, you're correct: you either need to import
button images to use as icons on native button objects, or create buttons
using roundrect graphics and/or groups.

When it comes to behaviors, native buttons are simply the containers that
hold the behavior scripts for whatever objects they are assigned to --
behaviors can be assigned to virtually any object in LiveCode.  I'm not sure
why you would need to style/modify a behavior button with a gradient.

So your workflow could be to create your custom button object (graphic or
group) and then place its operating script/s within the object itself, or
set the object's behavior to a native button that contains the operating
script/s.

Hope this helps.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



Recently, Keith Clarke wrote:

> Hi folks,
> Is there any particular reason why buttons don't support gradients - at least
> for those styles of button that are not attempting to be (desktop)
> OS-compliant, such as rounded rectangles?
> 
> This seems strange as native gradient support for rounded rectangle buttons
> would (seem to) simplify web and mobile app development(?)
> 
> The current (manual) workflow a tad long-winded:
>   for each button
>       for each state
>           create rounded rectangle graphics for fill and border, group, import
> as an image and set as the button's icon
>      next state
>   next button
> 
> Am I missing a trick here - or is it perhaps that with behaviours, buttons are
> now obsolescent for the UI and instead, we should be setting common,
> button-like behaviours and styles onto graphics (or groups)?
> 
> But currently, behaviours have to point to buttons - and buttons don't support
> gradients - return to line 1!!
> 
> Can anyone help break this loop?
> Best,
> Keith..






More information about the use-livecode mailing list