Radio Button Question

Sarah Reichelt sarah.reichelt at gmail.com
Sun Dec 17 18:38:59 EST 2006


On 12/18/06, Charles Szasz <cszasz at mac.com> wrote:
> I have three radio buttons on the second card of a two card project.
> Each radio button has a script. I used the following script in a
> button on the first card:
>
> on mouseUp
>      set the hilited of button "radio1" to false
>      set the hilited of button "radio2" to false
>      set the hilited of button "radio3" to true
>      send mouseUP to button "radio3"
>   end mouseUp
>
> I used the mouseUp command because my script for radio button
> "radio3" was NOT being executed despite setting the hilite property
> to true.
>
> Is there a better way to do this without using the moueUp command?


Setting the hilite will not automatically send a mouseUp, however if
the radio buttons are grouped, you could use:
  click at the loc of button "radio3"
which will set all the hilites correctly and do the mouseUp.

A shorter way of setting all the hilites in a group is to say:
  set the hilitedButtonName of group "whatever" to "radio3"
but again, this will not trigger the mouseUp message.

HTH,
Sarah



More information about the use-livecode mailing list