右2左组合框左对齐 [英] Right-2-Left combo box is left aligned

查看:119
本文介绍了右2左组合框左对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个R2L组合框(实际上是一个DataGridViewComboBoxCell控件)的问题:下拉列表左对齐而不是右对齐。我指的是以下内容:在L2r语言(如英语)中,左下角与组合框左侧位置对齐。
如果下拉组合比组合框本身更宽,它将"向右延伸"。我希望在R2L组合框中有正确的对齐方式。换句话说,下拉列表的右侧应该与组合框的右侧对齐,并将
扩展到左侧。

I have a problem with a R2L combo box (actually a DataGridViewComboBoxCell control): the drop down is left aligned and not to right aligned. I mean the following: in L2r language (like English), the drop down left side is aligned with he combo box left position. If the drop down with is wider as the combo box itself, it will be 'extended to the right. I expect in a R2L combo box with right aligment. In other words, the right side of the drop down should be aligned to the right side of the combo box, and extending it to the left.

问题的结果是当组合框很窄时,下拉为宽,组合框显示在显示的右侧,实际下拉显示在可见窗口之外。

The result of the problem is that when the combo box is narrow, drop down with is wide and the combo box is on at the right side of the display, the actual drop down is displayed outside the visible window.

顺便说一句,下拉列表中的文本正确显示R2L。问题只在于下拉对齐。

BTW, the text inside the drop down is correctly displayed R2L. The problem is only with the drop down alignment.

这是一个已知错误(VS2008,.NET 3.5,C#)吗?有没有办法正确对齐下拉?

Is it a known bug (VS2008, .NET 3.5, C#)? Is any way to right align the drop down?

推荐答案

嗨micha.benefraim,

Hi micha.benefraim,

您可以设置RightToLeft属性来控制应用程序中的此功能。

You can set the RightToLeft property to control the this feature in your application.

this.comboBox1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.righttoleft.aspx

RightToLeft属性用于从右到左书写语言的国际应用程序,例如希伯来语或阿拉伯语。当此属性设置为RightToLeft.Yes时,包含文本的控件元素将从右向左显示。

The RightToLeft property is used for international applications where the language is written from right to left, such as Hebrew or Arabic. When this property is set to RightToLeft.Yes, control elements that include text are displayed from right to left.

 

如果有任何问题,请随时告诉我。

If there's any concern, please feel free to let me know.

祝你有愉快的一天!


这篇关于右2左组合框左对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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