Changing backgroundColor of a button changes its style ?

Richard Gaskin ambassador at fourthworld.com
Mon Jun 18 13:17:33 EDT 2018


Alex Tweedly wrote:
 > 1. create a new stack
 > 2. drag a 'standard button' from the toolbar onto it
 > (you now have a nicely rounded-corner button)
 > 3. set its script to
 >
 > on mouseup
 >     set the backgroundcolor of me to "200,50,50"
 > end mouseup
 >
 > 4, click on 'browse mode' so the stack is "live"
 > 4a. observe the button still has nicely rounded corners :-)
 > 5. click on it
 >
 >   the backgroundcolor changes to red
 >
 > AND the rounded corners disappear - it's now a rectangular button.
 >
 > What am I doing wrong or missing ?

If you apply a non-standard color, it's no longer a standard button.

We have a roundrect style that may work for the type of non-standard 
button you're looking for.

But AFAIK the "standard" button relies on OS routines to render its 
shape, gradient fill, etc., and the OS APIs provide little support for 
non-HIG alterations.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list