VB .Net组合框文本水平对齐 [英] VB .Net Combo Box Text Horizontal Alignment

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

问题描述

我正在将VS 2008(VB)与.Net 3.5配合使用.在我的表单上,我有一个带有长文本字符串的组合框.这些都可以通过DropDownWidth属性很好地容纳.但是,当从列表中选择一个项目时,它看起来与左"对齐,而不是我期望的那样.

I'm using VS 2008 (VB) with .Net 3.5.  On my form I have a Combo Box with long text strings.  These are accomodated fine by DropDownWidth property.  However, when an item is selected from the list, it appears aligned to the Left not the Right as I would expect.  How can I get the selected text to align on the Left?

推荐答案

一种方法是将ComboBox的RightToLeft属性设置为YES.一开始对您和用户来说,它看起来很奇怪,但是您将获得想要的效果.这将导致下拉箭头显示在ComboBox的左侧,并且项目与右侧对齐.


One way would be to set the ComboBox's RightToLeft property to YES.  It will look strange to you and users at first, but you will get the effect you want.  This causes the drop-down arrow to appear on the LEFT side of the ComboBox and the items are aligned to the right side.



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

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