Page 1 of 1

Checkboxes

Posted: Sat Aug 25, 2012 10:25 pm
by PoLyGLoT
Hi all,

Normally, I group radio buttons together and use code such as "set the hilitedbutton of group BLAHBLAH to 0" or "put the hilitedbutton of group BLAHBLAH after data".

However, now I need to use checkboxes wherein ALL 4 options could be selected. If I use the code above, only the first option gets reported in data.

Any help is appreciated. Thank you.

Re: Checkboxes

Posted: Sat Aug 25, 2012 11:06 pm
by Klaus
Hi,

you need to check "the hilite of btn X" manually, maybe in a repat loop.
Like this:

Code: Select all

...
repeat with i = 1 to 4
  put the hilite of btn ("checker" & i) & CR after tList
end repeat
## Get rid of trailing CR
delete char -1 of tList
...
Now you have CR delimited list with the hilites of your buttons.
Example
true
false
false
true

You get the picture :D


Best

Klaus

Re: Checkboxes

Posted: Sun Aug 26, 2012 12:41 am
by PoLyGLoT
Thank you. Your code allowed me to configure things correctly. (I set it up so that it transformed the "true" and "false" to "1"s and "0"s, and did not delimit them on individual lines but with commas).

:)

Re: Checkboxes

Posted: Sun Aug 26, 2012 11:45 am
by Klaus
Hi,

a COMMA separated list is also fine :D
Whatever works for you!


Best

Klaus