Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New pane added to wrong tab group

For some reason, whenever I create a new class by right clicking on a project in the Solution Explorer pane and choosing Add Class or Add New Item (which is a class), the pane to edit the code for the class shares the tab group of Solution Explorer and not the tab group of other code windows I already have open. A picture is worth a thousand words, so have a look at this example:

alt text

I just added Menu2.cs to my project and it got opened in Solution Explorer's tab group, instead of the right hand side tab group where other (code/text) files are opened.

Update: Apparently it's worse than I thought. If I double click on any source file in my project that is not currently open, it will also (wrongly) open in the Solution Explorer tab group.

Update 2: (Solution) Undocking and redocking Solution Explorer to the left edge fixed the problem, thanks to the people who answered. You have to choose the far left (or far right) image and not the near left/right one, to avoid this problem:

alt text

Sorry for the cut off image, but that was the best I could do to screen capture the fade in icons for pane positioning.

like image 396
Michael Goldshteyn Avatar asked Nov 01 '10 14:11

Michael Goldshteyn


2 Answers

I almost posted this as a comment instead of an answer, as I'm not 100% right now on this;

But it looks to me like Solution Explorer is in a 'normal' document area, and not a sidebar area. New documents, from my experience, open in the left/top most regular document area, hence the behavior you are getting, perhaps?

You might try re-docking Solution Explorer while keeping Menu2.cs open; if I'm right, that will allow you to make sure you have SE docked to a side bar, and that might help.

Going to play with it some myself now, too...

like image 21
Andrew Barber Avatar answered Sep 28 '22 06:09

Andrew Barber


You docked the Solution Explorer as a content window instead of a tool pane.
Therefore, you now have two document panes, one of which contains the Solution explorer.
When you open a new document, it opens in the last focused document pane, which in your case is the one containing the Solution Explorer. (Since you just used it to open the file)

To fix this, undock the Solution Explorer, then re-dock it on the far right.
Then, move any tabs still in the right tab group back to the main tab group.

like image 188
SLaks Avatar answered Sep 28 '22 04:09

SLaks