Search code examples
c#winformswindows-forms-designer

How to position a ToolStrip under a Panel


I put the first ToolStrip at the Top of the GroupBox (Documents), then a Panel underneath that (also Dock-Top). Now I want to put another ToolStrip directly underneath the Panel. However, none of the positions in the Dock property do this. As shown, the Dock property is Top, which puts it directly underneath the first ToolStrip and on top of the Panel.

How do I get the 2nd ToolStrip directly underneath the Panel?

enter image description here


Solution

  • As @HansPassant suggested, the trick is to drop the ToolStrip in the correct position. What is correct, however, is not obvious. I played around with where I dropped the 2nd ToolStrip and I found where it works. As I drag the ToolStrip around the Designer, a thin blue line appears a various positions. When the thin blue line appears at the bottom of the GroupBox and I drop the ToolStrip there and the ToolStrip then appears at the desired position, underneath the Panel.