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

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
karmacomposer
Posts: 361
Joined: Wed Apr 27, 2011 2:12 pm

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

Post by karmacomposer » Fri Jul 20, 2018 2:21 am

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
Last edited by karmacomposer on Fri Jul 20, 2018 3:17 am, edited 1 time in total.

jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

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

Post by jwtea » Fri Jul 20, 2018 2:35 am

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" ?

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

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

Post by ClipArtGuy » Fri Jul 20, 2018 2:40 am

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

karmacomposer
Posts: 361
Joined: Wed Apr 27, 2011 2:12 pm

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

Post by karmacomposer » Fri Jul 20, 2018 3:17 am

Thank you. Perfect.

Mike

Post Reply

Return to “Talking LiveCode”