Unhighlite All

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Unhighlite All

Post by bidgeeman » Wed May 20, 2009 4:47 am

Is there a way of deselecting, unhighlighting checkboxes with one command? Currently I'm using:

Code: Select all

unhilite button "checkbox1"
unhilite button "checkbox2"
unhilite button "checkbox3"
unhilite button "checkbox4"
I have a LOT of buttons and it's getting very time consuming to do it this way. :(

Many thanks
Bidge

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Wed May 20, 2009 5:46 am

If your checkbox buttons follow a strict naming pattern, you can do something like this:

Code: Select all

repeat with i = 1 to 10
  unhilite button ("checkbox" & i)
end repeat
Or if you place all the checkboxes into a single group:

Code: Select all

repeat with i = 1 to the number of buttons in group "CheckboxGroup"
  unhilite button i of group "CheckboxGroup"
end repeat
I hope this gave you a few ideas,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Wed May 20, 2009 6:02 am

Hello Janschenkel. The second option works great. Thanks for your reply.

Bidge

Post Reply