Dock toolbar with other toolbar's


I have created a toolbar, and always when I start SketchUp the toolbar icon’s state keeps undocked. I will have to manually drag the toolbar and dock it with the other toolbars on the top. Is there any way to do this automatically ?

I have tried doing

UI.start_timer(0.3, false) { tb.restore }

It helps to an extent. But this will not work when I start sketchup initially.


When my tool is under development and I’m making constant edits, sooner or later I introduce a “load time” bug. If that happens, then Sketchup of course starts up without my toolbar. (I’m running Sketchup on Windows 7).

After I have fixed the bug and I restart Sketchup, the toolbar will be un-docked. I will have to re-dock my toolbar. I have accepted the fact that when a tool and associated toolbar are under development, I just use the un-docked toolbar until the code is stable.