conditionally formatting a field

SparkOut SparkOutYNY at gmail.com
Thu Dec 18 18:21:23 CST 2008



mfstuart wrote:
> 
> SparkOut,
> The 'focusedObject' is the key script element for this to work.
> Thanx for the scripts. It works exactly how I want it to. 
> 
> ---------
> on mouseLeave
>    if the focusedObject is the long id of me then
>       set the borderColor of me to "#000000"
>    else
>       set the borderColor of me to "#ffffff"
>    end if
> end mouseLeave
> ---------
> 
> Regards,
> Mark stuart
> 
Glad it worked. Of course there is redundancy in the mouseLeave handler
above - you could always reduce it to:

on mouseLeave
  if the focusedObject is not the long id of me then
    set the borderColor of me to "#ffffff"
  end if
end mouseLeave

as in theory the borderColor should already be set to black anyway.
-- 
View this message in context: http://www.nabble.com/conditionally-formatting-a-field-tp21067108p21083662.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list