组合框中的文本大于组合框的大小 [英] text in combobox is larger then the size of combobox

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

问题描述

我有一个很长的字符串(60个charector),但我的组合框更小。

问题是当我点击组合框然后它没有显示string的总长度时,仅显示30个字符。

我该怎么办。

请帮帮我

谢谢!

解决方案

< blockquote>查看组合框上的 DropdownWidth 属性



读取此信息以获取更多信息< br $>


MSDN:combobox dropdownwidth属性 [ ^ ]


更改组合框的大小,使其宽度允许显示整个字符串。







限制字符串的大小,以便它可以完全显示注意组合框。







更改组合框的字体大小。


看一下System.Windows.Forms.TextRenderer。您可以使用它来测量Combobox文本的长度并分别调整大小。



希望这会有所帮助: - )


i have a long string(60 charector) but my combobox is smaller.
problem is this when i click on combobox then its not showing total length of string.its showing only 30 character only.
what should i do.
please help me
thank you!

解决方案

have a look at the DropdownWidth property on the combobox

have a read of this for further info

MSDN: combobox dropdownwidth property[^]


Change the size of your combobox so its width allows to display the whole string.

OR

Limit the size of your string so that it can be full displayed in the combobox.

OR

Change the size of the font of the combobox.


Have a look at System.Windows.Forms.TextRenderer. You could use it to measure the length of your Combobox''s text and ajust the size respectively.

Hope this helps :-)


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

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