Istrebitel
Istrebitel

Reputation: 3093

Bizzare bug in Windows Forms with ToolStripContainer (I don't even know how to explain, so here's a video)

Well, here it is. Watch this video to see what happens:

http://www.youtube.com/watch?v=-9uA2qWm5JI&feature=youtu.be

Basically, I have a ToolStripContainer on my form, because I want to have a MenuStrip on top and ToolStripStatusLabel on bottom. Inside the center panel, I want to have control that takes up most of its space (Anchored Top Left Bottom Right) and two buttons (Anchored Bottom Right)

It fails ridiculously.

So, I arrange it all on this ToolStripContentPanel control. Buttons are almost touching the bottom of the form. Then I run my program and a wild blank space appears! There's now like 30 or so pixels between the buttons and the form! So the form in the designer and the form in the actual program don't match up!

It gets more ridiculous. If, in the designer, I undo, then it gets completely screwed up. Just watch the video.

What the hell is going on here?

PS: How to reproduce:

1) Create new WinForms solution

2) Add ToolStripContentPanel Control to Form, Dock = Fill

3) Add Button to ToolStripContentPanel, Anchor = Bottom Right

4) Resize Form

5) Undo

6) Observe the bug

Do I need to post the code VS 2010 generates in Form1.cs and Form1.Designer.cs files?

Upvotes: 0

Views: 216

Answers (0)

Related Questions