Menustrip到右手边c#win。形成 [英] Menustrip to right hand side c# win. form

查看:285
本文介绍了Menustrip到右手边c#win。形成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在左边设置一些menustrip项目,在右边设置一些项目?



提前致谢。

how to set some menustrip items to the left and some items to the right?

Thanks in advance.

推荐答案

使用每个menustrip项目的Margin属性,将它们调整为你的希望。

例如



Use Margin property of each menustrip item, to adjust them as your wish.
For example

//moves first menustrip item to right side
           menuStrip1.Items[0].Margin = new Padding(100, 0, 0, 0);

           //moves second menustrip item to left side
           menuStrip1.Items[0].Margin = new Padding(0, 0, 100, 0);





如果它适合您,请使解决方案可接受。



If it works for you, make solution acceptable.


http://msdn.microsoft.com/en-us /library/system.windows.forms.menustrip_properties(v=vs.110).aspx [ ^ ]



寻找RightToLeft in那个页面......
http://msdn.microsoft.com/en-us/library/system.windows.forms.menustrip_properties(v=vs.110).aspx[^]

Look for RightToLeft in that page...


试试这个..



Try this..

private void Form1_Load(object sender, EventArgs e)
       {
           menuStrip1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
       }


这篇关于Menustrip到右手边c#win。形成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆