Lets say I've created a new command:
@toolbar=UI;;Toolbar.new("simulation")
@playcmd=UI;;Command.new("play"){simulation.new}
@playcmd.small_icon=@playcmd.large_icon="buttons/run.bmp"
@playcmd.tooltip="Start simulation"
@playcmd.status_bar_text="Start simulation"
@playcmd.menu_text="Start!"
@toolbar.add_item(@playcmd)
@toolbar.show()
Is there a way to change the icon of @playcmd any time I want? >
When I click @playcmd button I wan't its icon to change to different icon. Like at first click the icon changes to pause.bmp, and at second click I want icon to change back to run.bmp.