Late to this party but I would have thought that the simplest solution was to
have a field on one of the cards that has 0 in it at the start.
Then in each check box button have a script that simply adds 1 to the value in
that field when the check box is clicked on, and subtracts 1 from the fiel
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Counting-the-number-of-checkboxes-tp4678483p4678501.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-livecode mailing list
use-livecode@lists.runr
Peter,
You suggestion not only is faster but also works better than using controls in
the repeat script. I found that using controls does not work with more than 16
checkboxes. In my sample stack, the script using control works but there are
only four checkboxes.
Thanks!
Charles Szasz
csz.
You could save a few tick by using "the n umber of buttons" instead of "the
number of controls" and changing reference to "control x" to "button x".
Rather than set the behavior on 28 buttons, and assuming the cards are in
the same stack, just put the mouseUp handler into the stack script.
Pete
l
Paul,
Your script perfectly! Thanks so much! I was working on a repeat loop but you
saved me a great deal of time. And I had to have this before tomorrow! Thanks
again!
Dave, thanks for taking time to offer a scripting solution. I tried Paul’s
script before trying yours. I will take a look
Charles,
Here's another option.
My immediate thought was that this could be a use for an "after mouseUp"
handler in a behaviour button, so I tried this…
## Checkbox Behaviour Button Script
## This just loops through the controls on two cards and counts any highlighted
checkbox
after mouseUp
re & Hugh Senior
--
View this message in context:
http://runtime-revolution.278305.n4.nabble.com/Counting-the-number-of-checkboxes-tp4678483p4678490.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-livecode mailing list
us
I have 28 checkboxes on two cards. I need to count the total number of
checkboxes checked by the user. I have throughout the archives and could not
find an example of how to do this. Anybody have a suggestion on how to script
this?
Charles Szasz
csz...@mac.com
___