简体   繁体   中英

Tool, menu strip - how do I change their locations in c# winforms?

I noticed that tool and menu strips are very restrictive.

Is there any way to change the location of a toolstrip or menustrip? I want to have a drop down menu in a custom location on my winforms application (I'm using c#).

If not, is there any other dropdown menu type component I can try?

Yes, you can easily do that.

  • Drag and drop MenuStrip
  • Select it and Goto->Properties
  • Set Dock-> None
  • Then move anywhere as you want.

You can place a ToolStrip at any location if you set the Dock property to DockStyle.None .

Alternatively, you can use a ContextMenuStrip and show it manually with one of the ContextMenuStrip.Show methods.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM