如何在下拉菜单中将文本分成两行 [英] How to break text in two line in dropdown

查看:89
本文介绍了如何在下拉菜单中将文本分成两行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


谁能帮我.
我有一个下拉列表,上面有一些非常大的文字要显示.
因此我的文本无法完全显示在dropdowm中,所以我如何将文本分成两行.

在此先感谢

Hi,
can anyone help me .
i have one dropdown list on which i have some very big text to show.
so my text is not displaying in dropdowm completly so how can i break text in two line.

Thanks in advance

推荐答案

尝试文章中的代码:

扩展的DropDownList [
try code in the article:

Extended DropDownList[^]




您可以尝试找出能显示多少个字符,然后从字符串中的该位置回头查找空白.用"\ n"代替空白,您应该在两行上显示一些内容(如果显示项目支持多行.

另一种选择是将线停在最大长度上,并使其以椭圆形结束(...).然后在上下文帮助气球中显示完整的行(可能再次分成多行).

希望这可以帮助; AT
Hi,

What you can try is to find out how much characters you can show, then from that position in the string look back to find a white space. Replace that white space by a ''\n'' and you should have something that displays on two lines (if the displaying item supports multi line.

Another alternative is to stop the line on the max lenght and make it end on an ellipses (...). then show the full line (possibly split again over multiple lines) in a context help baloon.

Hope this helps; AT


这篇关于如何在下拉菜单中将文本分成两行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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