6

I'm using a ToolStripContainer that contains three ToolStrips. At design time I move the ToolStrips to the positions I want them in, which is in a horizontal row across the top of the form like this:

alt text

I then close and save the Form. However, if I open the form up again the ToolStrips end up stacked up on the left side of the ToolStripContainer like this:

alt text

How can I keep the ToolStrips in the positions that I specify?

Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
  • Can you post the code you have that defines the ToolStripContainer and adds the ToolStrips. – ChrisF Jun 15 '10 at 11:15

1 Answers1

7

This is a bug with Visual Studio. I've had the same issues for years. The only way I've found is to programmatically set all the ToolStrips' Dock property to Right. Do this in the Form's constructor, just after the call to InitializeComponent.

Adel Hazzah
  • 8,737
  • 2
  • 20
  • 16
  • 1
    What a weird bug. This works, they still screw up in the designer but they stack correctly at runtime. Very weird. Thanks :) – craftworkgames Jun 27 '13 at 10:43