check box and closefield

Sarah sarahr at genesearch.com.au
Mon Sep 15 19:04:00 EDT 2003


Group your check boxes and put a script like this in the group:

on mouseUp
   put empty into field "Field 1"
   repeat with x = 1 to 6
     if the hilite of button ("Button " & x) then put field ("Field " & 
x) after field "Output"
   end repeat
end mouseUp

Make sure that if you don't have any mouseUp handlers in the individual 
buttons, or the message won't get through to the group.

In your closeField handlers, you could set the hilite of the relevant 
checkbox, then send mouseUp to group "Buttons Group"

Cheers,
Sarah

On Monday, September 15, 2003, at 02:22  pm, Michael Young wrote:

> Hello,
>
> I am trying to put text field information into an output text field if 
> a check box is true. In addition if I change the check box's text 
> field information then I want the check box set to true and the text 
> field information sent to output text field. I have written the 
> following scripts that appear to work correctly. (Feel free to 
> critique my style, since I am still learning.)
>
> Button 1 script:
> on mouseUp
>   if hilite of me
>      then put fld "Field 1" into fld "Output"
>      else put "" into fld "Output"
> end mouseUp
>
> Field 1 script:
> on closefield
>   if hilite of btn "Button 1" is false
>   then hilite btn "Button 1"
>   put fld "Field 1" into fld "Output"
> end closefield
>
> What I cannot figure out how to do is create x buttons with x fields 
> and send the field information to the output text field in the button 
> order, i.e.
> button 1 true
> button 2 true
> button 3 false
> button 4 true
> button 5 false
> button 6 true
> etc.
>
> should yield output text field
> field 1
> field 2
> field 4
> field 6
> etc.
>
> Thank you for your assistance,
>
> Michael
> RR 2.1
> OS X 10.2.6
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>




More information about the use-livecode mailing list