Page 1 of 1

[SOLVED] How do I put the results of a checkbox into a variable

Posted: Fri Jul 20, 2018 2:21 am
by karmacomposer
I have the following, which works (I think):

Code: Select all

get the hilited of button "ckNewClient"
How do I now put that into a variable?

I tried:

Code: Select all

get the hilited of button "ckNewClient" and put it into varNewClient
Did not work. What is the correct syntax please?

I do look these things up in google and the LiveCode dictionary, manual and wiki, but there are no direct answers.

Mike

Re: How do I put the results of a checkbox into a variable

Posted: Fri Jul 20, 2018 2:35 am
by jwtea
Hello , karmacomposer! :D

What do you mean by the results of a checkbox into a variable??

You mean by when the checkbox is tick you receive "1" and checkbox is untick you receive "0" ?

Re: How do I put the results of a checkbox into a variable

Posted: Fri Jul 20, 2018 2:40 am
by ClipArtGuy
I started writing an if/then option and a switch/case option, but then I realized that this works:

Code: Select all

put the hilited of btn "ckNewClient" into varNewClient

Re: How do I put the results of a checkbox into a variable

Posted: Fri Jul 20, 2018 3:17 am
by karmacomposer
Thank you. Perfect.

Mike