How to hilite a checkbox with send mouseup?
Jim Ault
jimaultwins at yahoo.com
Tue Feb 15 11:01:47 EST 2011
On Feb 15, 2011, at 7:07 AM, Tiemo Hollmann TB wrote:
> Hello,
>
> when sending: send "mouseup" to btn "test" the button gets the
> mouseUp
> command, but doesn't hilite, though it's property Autohilite is true.
>
> Do I really have to set additionally the hilite of that button by
> script?
>
> I also have "pass mouseUp" in the buttons mouseUp handler and I am
> getting
> "exit" as the result in the message box
>
> What am I missing? Why do I get "exit" in the message box?
>
mouseUp is a LCode message, not an event.
just as 'mouseUpIwantToTrap' is a message you could send to an object,
or a stack script, or a back script, etc.
Clicking on a checkbox will both send the message and perform the event.
set the hilite of btn "chkboxStatus" to true
Sending the 'mouseUp' message will work just fine even if the check
box is hidden, on a different card, or on a card in a different
stack. The same goes for setting the hilite.
send "mouseUp" to btn id 1022 of card id 1446 of stack "Survey
Questions"
set the hilite of btn "chkboxStatus" of card id 1446 of stack "Survey
Questions" to true
Hope this helps
-----------------
Why not step through your code and see what happens in the flow of the
script?
It sounds like 'pass mouseUp' is triggering the 'exit' string.
Hope this helps
Jim Ault
Las Vegas
More information about the use-livecode
mailing list