Hi Folks,
in my Application I am changing the state of a drawer by clicking a button (using interfaces toggle & connect)!
Is there a possibility to close a drawer when another one will be opened? There are 3 drawers which are above
the other…
Thanks for any feedback…
Stefan
Hey Stephan,
I have used this code in my projects to do what you are trying to do:
on clicked theObject
if name of theObject is "DRAWER_1_BUTTON" then
tell window of theObject
set currentState to state of drawer "DRAWER_1"
if currentState is equal to drawer opened or currentState is equal to drawer closing then
tell drawer "DRAWER_1" to close drawer
else
tell drawer "DRAWER_1" to open drawer on right edge
end if
tell drawer "DRAWER_2" to close drawer
tell drawer "DRAWER_3" to close drawer
tell drawer "DRAWER_4" to close drawer
end tell
end if
end clicked
Hope this helps,
CarbonQuark
Hi CarbonQuark,
thanks a lot for the hints - it solves the problem…
Best Regards,
Stefan