Color of a graphic

Devin Asay devin_asay at byu.edu
Wed Nov 9 12:51:19 EST 2011


Pete,

Why not just create the various states of your arrow graphic and import snapshots of the various states as images:

  import snapshot from grc "arrow" [with effects]

Then just hide them and assign the images as icon states of a button. Then you don't have to manage the look of your graphic in your scripting. I do this all the time and it works great.

HTH

Devin

On Nov 9, 2011, at 10:40 AM, Pete wrote:

> The graphic is interactive since I'm using it as a button (with a mouseUp
> handler).  I guss drwaing a graphic was just a convenient way of creating
> an arrow without searching around for an icon to use as a button icon.
> 
> Right now, I'm changing the blendlevel of the graphic to 50 when I disable
> it, then back to 0 when it's enabled again.  That gives the right visual
> effect and preserves the color.
> 
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
> 
> 
> 
> 
> 2011/11/9 Björnke von Gierke <bvg at mac.com>
> 
>> I suggest not to disable graphics. Unless they're interactive to begin
>> with, disabling them is kinda pointless. Instead change the foregroundcolor
>> to a grey.
>> 
>> put "100,100,100" into theGrey
>> set the foregroundcolor of graphic "myArrow" to theGrey
>> 
>> On 9 Nov 2011, at 04:12, Pete wrote:
>> 
>>> Thanks Craig, good to know it's not just me!
>>> 
>>> Pete
>>> Molly's Revenge <http://www.mollysrevenge.com>
>>> 
>>> 
>>> 
>>> 
>>> On Tue, Nov 8, 2011 at 6:14 PM, <dunbarx at aol.com> wrote:
>>> 
>>>> Pete.
>>>> 
>>>> 
>>>> Interesting. Adding color seems to disable, er, disabling.
>>>> 
>>>> 
>>>> 
>>>> Why not store the color in a custom property, and when you disable the
>>>> graphic,  clear the color as well, restoring it when you re-enable.
>>>> 
>>>> 
>>>> 
>>>> Craig Newman
>>>> 
>>>> 
>>>> 
>>>> 
>>>> -----Original Message-----
>>>> From: Pete <pete at mollysrevenge.com>
>>>> To: How to use LiveCode <use-livecode at lists.runrev.com>
>>>> Sent: Tue, Nov 8, 2011 11:50 am
>>>> Subject: Color of a graphic
>>>> 
>>>> 
>>>> I set up a line with an arrow at the end as a graphic.  If I disable
>> it, it
>>>> shows up grey.  If I change the color of it (the text/border color), the
>>>> color doesn't change when I disable it.
>>>> 
>>>> I can change the blendlevel to make it appear disabled but is there some
>>>> other property to make it appear disabled visually?
>>>> 
>>>> Pete
>>>> Molly's Revenge <http://www.mollysrevenge.com>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription
>>>> preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> 
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> 
>>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> --
>> Watch live presentations every Saturday:
>> http://livecode.tv
>> 
>> Use an alternative Dictionary viewer:
>> http://bjoernke.com/bvgdocu/
>> 
>> Chat with other RunRev developers:
>> http://bjoernke.com/chatrev/
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University







More information about the use-livecode mailing list