blocking button hilite

Charles Hartman charles.hartman at conncoll.edu
Sat Jul 23 09:38:40 EDT 2005


Magnifique. Thanks!

coh

On Jul 23, 2005, at 9:34 AM, Eric Chatonet wrote:

> Hi Charles,
>
> All questions always make sense.
> Some answers no :-)
>
> Le 23 juil. 05 à 15:19, Charles Hartman a écrit :
>
>
>> Is there a way to prevent a button from being hilited when  
>> clicked? I want to put hilite under script control, but the  
>> toggling of hilite happens before the mouseUp handler is entered.
>>
>
> Have a look at the autoHilite property and set it to false (there  
> is a checkbox in the property inspector).
> Then script mouseDown, mouseUp and mouseRelease handlers according  
> to you needs.
>
>
>> Also, more or less the same question about the "visited" property.  
>> I can set it false for all buttons in an openCard handler -- but  
>> as soon as one is clicked, before its mouseUp handler is called,  
>> the button's "visited" is already set to true.
>> So how can I tell within a button's mouseUp handler whether it's  
>> been clicked before? (If it has been, I want to prevent the hilite  
>> from toggling back and forth, and also prevent a "tasks to do"  
>> counter from being decremented.)
>>
>
> Normal behaviour:
>
> on mouseDown > visited = false (or true)
> on mouseUp > visited = true
>
> So check the visited property on mouseDown and set a flag to act  
> within the mouseUp handler:
>
> local lVisitedFlag
> ---------------------------
> on mouseDown
>   put the visited of me into lVisitedFlag
> end mouseDown
> ---------------------------
> on mouseUp
>   if lVisitedFlag then...
>   else...
> end mouseUp
>
>
> Best Regards from Paris,
>
> Eric Chatonet.
> ----------------------------------------------------------------
> So Smart Software
>
> For institutions, companies and associations
> Built-to-order applications: management, multimedia, internet, etc.
> Windows, Mac OS and Linux... With the French touch
>
> Free plugins and tutorials on my website
> ----------------------------------------------------------------
> Web site        http://www.sosmartsoftware.com/
> Email        eric.chatonet at sosmartsoftware.com/
> Phone        33 (0)1 43 31 77 62
> Mobile        33 (0)6 20 74 50 86
> ----------------------------------------------------------------
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

Charles Hartman
Professor of English, Poet in Residence
Connecticut College
charles.hartman at conncoll.edu
*the Scandroid* is at cherry.conncoll.edu/cohar/Programs.htm





More information about the use-livecode mailing list