Toggle toolbar button pressed state


Is there any way to toggle the toolbar button’s pressed state to ‘PRESSED’ or ‘UNPRESSED’.
When I do Sketchup.active_model.select_tool(tool) the button associated to ‘tool’ is not changing to ‘PRESSED’ state.


Look up the “Command#set_validation_proc” method.


I have used the “Command#set_validation_proc” to gray and check right click menu options for a tool that I developed.

I have noticed on Windows that when a toolbar button is configured to run a simple Ruby program, then the button pops up immediately. If the button has code that does:


Where “my_tool” is a Tool class object that I defined, then the button stays down until I exit my tool.

Are you on Mac or Windows?
What methods does your “tool” object support?