PDA

View Full Version : how to uncheck checkd button on toolbars


MarcoBrunetta
03-05-2008, 04:58 PM
The macroscript Im working on includes a rollout floater that opens when the script button is pressed. It also uses the "on isChecked" event to make the button on the toolbar a checkbutton. However if the user closes the floater by hitting the X on the top, then the button on the toolbar remains checked, wich results on the user havign to double-click the button in order to open it again.

This, of course, is not a big deal, but the script would look a lot more "profesional" if the button on the toolbar would uncheck when hitting the X. I can use a "on <rollout> close" event on the first rollout inside the folater to call a function to un-check the button. However I have so far been unable to find wich sed function could be...

Any tips??

Thanks.

Zbuffer
03-05-2008, 08:26 PM
There you go ;)

macroscript CkeckTest
category:"Test"
buttonText:"T"
(
global Ro_Test
local UIopen= false
on isChecked return UIopen
on execute do
(
if UIopen then -- close UI
(
destroyDialog Ro_Test
)
else
(
rollout Ro_Test "Check Test"
(
label l1 "on isChecked Test rollout"

on Ro_Test open do UIopen=true
on Ro_Test close do
(
UIopen=false
updateToolbarButtons()
)
)
createdialog Ro_Test
)
)
)

MarcoBrunetta
03-06-2008, 04:21 AM
So, updatetoolbarbuttons eh? Makes sense...

Thanks!

CGTalk Moderation
03-06-2008, 04:21 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.