# Badly behaved toolbars in RS3.1

**URL:** <https://tech-community.robotics.abb.com/t/badly-behaved-toolbars-in-rs3-1/207>\
**Category:** RobotStudio S4\
**Created:** [September 23, 2004, 9:50am UTC](https://tech-community.robotics.abb.com/t/badly-behaved-toolbars-in-rs3-1/207 "2004-09-23T09:50:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin](https://avatars.discourse-cdn.com/v4/letter/k/2acd7d/32.png) [@Kevin](https://tech-community.robotics.abb.com/u/Kevin)\
**Post date:** [September 23, 2004, 9:50am UTC](https://tech-community.robotics.abb.com/t/badly-behaved-toolbars-in-rs3-1/207/1 "2004-09-23T09:50:26Z")

</div>

When Robot Studio 3.1 starts (running under XP) the toolbars associated with the five add-ins I am using do not appear where they were last placed. Instead they push the standard toolbars for Selection Level, Snap Mode, Measurement and Freehand Move off the right-hand side of the screen. It is then necessary to drag them all back to my preferred positions again.

Is there a fix for this please?

Regards,

Kevin

---

<div class="post-metadata">

**Author:** ![John\_Wiberg](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/john_wiberg/32/1485_2.png) [@John\_Wiberg](https://tech-community.robotics.abb.com/u/John_Wiberg)\
**Post date:** [September 23, 2004, 10:47am UTC](https://tech-community.robotics.abb.com/t/badly-behaved-toolbars-in-rs3-1/207/2 "2004-09-23T10:47:46Z")

</div>

Hmm, every time that RS loads it cleans out all toolbars, then it adds all default toolbars to their last known location, then it adds all toolbars from add-ins. If those add-ins are on the same row as a default it will push it out as you say.

So the workaround is to have default and add-in toolbars on different rows and not mix them.

Or write a macro that resets them to the order you want them in.  
Here comes an examle that I use to get the exact same appearance when recording eLearning sreencams.

First put all toolbars where you want them to be, then run this sub to get the values:

> Sub ListTheValues()  
> Dim cb As CommandBar  
> ActiveStation.PrintLog “Log”, “- - - - - - - - -”  
> For Each cb In RSE.CommandBars  
> If cb.Name \<\> “Menu Bar” Then  
> ActiveStation.PrintLog “Log”, cb.Name  
> ActiveStation.PrintLog “Log”, "Visible: " & cb.Visible & ". Row: " & cb.RowIndex & ". Left: " & cb.Left  
> End If  
> Next cb  
> End Sub

Then put those values into this sub:  
(You will need to make cases for all your toolbars).

> Sub FixThePositions()  
> 'if you set visible to false you dont need a row and left value  
> Dim cb As CommandBar  
> For Each cb In RSE.CommandBars  
> If cb.Name \<\> “Menu Bar” Then  
> Select Case cb.Name  
> Case “File”  
> cb.Visible = True  
> cb.RowIndex = 0  
> cb.Left = -1  
> Case “View”  
> cb.Visible = True  
> cb.RowIndex = 0  
> cb.Left = -1  
> Case “Create Components”  
> cb.Visible = False  
> cb.RowIndex = 0  
> cb.Left = -1  
> Case “Simulation”  
> cb.Visible = True  
> cb.RowIndex = 0  
> cb.Left = -1  
> Case “Motion Time”  
> cb.Visible = True  
> cb.RowIndex = 0  
> cb.Left = -1  
> Case “Selection Level”  
> cb.Visible = True  
> cb.RowIndex = 0  
> cb.Left = -1  
> Case “Snap Mode”  
> cb.Visible = True  
> cb.RowIndex = 0  
> cb.Left = -1  
> Case “Measurement”  
> cb.Visible = False  
> cb.RowIndex = 0  
> cb.Left = -1  
> Case “Freehand”  
> cb.Visible = True  
> cb.RowIndex = 0  
> cb.Left = -1  
> Case “Elements”  
> cb.Visible = True  
> cb.RowIndex = 0  
> cb.Left = -1  
> End Select  
> End If  
> Next  
> End Sub

---

<div class="post-metadata">

**Author:** ![Kevin](https://avatars.discourse-cdn.com/v4/letter/k/2acd7d/32.png) [@Kevin](https://tech-community.robotics.abb.com/u/Kevin)\
**Post date:** [September 23, 2004, 11:09am UTC](https://tech-community.robotics.abb.com/t/badly-behaved-toolbars-in-rs3-1/207/3 "2004-09-23T11:09:10Z")

</div>

Thanks for the code John.

The add-in toolbars are actually on their own on a third row and in the following order:

John’s Toolbar, AVI Capture, Path Configurator and Hose.

(The fifth add-in is a special being written for us by Per Svennson, but the problem remains without it loaded.)

The add-in toolbars always appear in the second row, immediately after the ‘Create Path from Curve’ button.

Regards,

Kevin

---

<div class="post-metadata">

**Author:** ![Kevin](https://avatars.discourse-cdn.com/v4/letter/k/2acd7d/32.png) [@Kevin](https://tech-community.robotics.abb.com/u/Kevin)\
**Post date:** [September 23, 2004, 12:17pm UTC](https://tech-community.robotics.abb.com/t/badly-behaved-toolbars-in-rs3-1/207/4 "2004-09-23T12:17:24Z")

</div>

Hi John,

I discovered that I did not have the standard toolbars in the default order.

Having reset the workspace, all the add-in toolbars are now located in the third row at startup. They appear in an order determined by RS rather than in my chosen order, but that’s no problem.

Thanks for your help.

Kevin

---

<div class="post-metadata">

**Author:** ![John\_Wiberg](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/john_wiberg/32/1485_2.png) [@John\_Wiberg](https://tech-community.robotics.abb.com/u/John_Wiberg)\
**Post date:** [September 23, 2004, 4:57pm UTC](https://tech-community.robotics.abb.com/t/badly-behaved-toolbars-in-rs3-1/207/5 "2004-09-23T16:57:46Z")

</div>

Glad to be of assistance.

👍
