Code: Select all
if the hilite of btn "1" is true and the hilite of group "group1" is false then
set the visible of graphic "rec1" to true
else
set the visible of graphic "rec1" to false
end if
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
if the hilite of btn "1" is true and the hilite of group "group1" is false then
set the visible of graphic "rec1" to true
else
set the visible of graphic "rec1" to false
end if
Point taken. I'll make those changes.Klaus wrote:Hi shawn,
1. it is a really bad idea to give objects a name with a "pure" NUMBER!
Beause the engine will get confused and treats -> button "1" as the button with the NUMBER 1
(lowest layer) even if that button is actually button number 666!
Use something like -> button "b1"
2. GROUPS do not have a hilite property, so what exactly do you want to achieve with:
the hilite of group "group1" ?
Best
Klaus
so this is a group of radiobuttons?shawnblc wrote:What I'm trying to accomplish is this (see below example):
[] Clothes
[] Pants
[] Shorts
[] Shoes
[] Socks
If yes, you can check:shawnblc wrote:so if clothes is checked, then at least on of the others should be checked. If not I need a red graphic that shows around the group (pants, shorts, shoes, socks).
Code: Select all
on mouseup
switch the hilitedbuttonname of me
case "Clothes"
## do whatever needs to be done...
break
case "Pants"
## do whatever you need to to in case the user selected PANTS
break
## etc...
end switch
end mouseup
Code: Select all
put false into tButtonCheck
repeat with i = 1 to the number of buttons in group "group1"
if the hilite of button i of group "group1" is true then put true into tButtonCheck
end repeat
if the hilite of btn "1" is true and tButtonCheck is false then
set the visible of graphic "rec1" to true
else
set the visible of graphic "rec1" to false
end if
AHA!shawnblc wrote:No it's checkboxes.
Code: Select all
function is_something_checked
repeat for each item tButton in "pants,shorts,shoes,socks"
if the hilite of btn i = TRUE then
## At least ONE button has been checked
return TRUE
end if
end repeat
## No button checked:
return FALSE
end is_something_checked