Operating with checkboxes

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Ultravibe
Posts: 65
Joined: Sat Jan 17, 2015 12:06 pm

Operating with checkboxes

Post by Ultravibe » Mon Feb 02, 2015 12:06 am

Good day!
Could you help me with your advise, how to use checkboxes:
I can already set the visibility of checkboxes (example: set the visible of button "Check1" to false / true)
Now i need to know:
1) How i can set the value (box checked or not) manually (not by clicking on it, but set it in program code)?
2) How can i know a current state of checkbox (checked or not) and use it in expressions?
Thank U!!!!

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Operating with checkboxes

Post by Dixie » Mon Feb 02, 2015 12:25 am

Code: Select all

set the hilite of button "whateveritsnameis" to true
will give the button a 'checkmark"

Code: Select all

set the hilite of button "whateveritsnameis" to fale
will remove the checkmark

to find out its state...

Code: Select all

put the hilite of button "whateveritsnameis" into myVar
the variable myVar will contain true or false depending on whether the button is displaying a checkmark or not.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Re: Operating with checkboxes

Post by dunbarx » Mon Feb 02, 2015 1:12 am

Hi.

When you get that down, play with radio buttons, where the normal behavior is that only one of each group of buttons may be hilited at any one time.

This is different for your question about checkboxes, where one or more than one may be hilited.

Craig Newman

Ultravibe
Posts: 65
Joined: Sat Jan 17, 2015 12:06 pm

Re: Operating with checkboxes

Post by Ultravibe » Mon Feb 02, 2015 8:00 am

Thank you, guys!!!!


Post Reply