Page 1 of 1

Unhighlite All

Posted: Wed May 20, 2009 4:47 am
by bidgeeman
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

Posted: Wed May 20, 2009 5:46 am
by Janschenkel
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.

Posted: Wed May 20, 2009 6:02 am
by bidgeeman
Hello Janschenkel. The second option works great. Thanks for your reply.

Bidge