如何在下拉菜单中将文本分成两行

编程入门 行业动态 更新时间:2024-10-28 09:19:37
本文介绍了如何在下拉菜单中将文本分成两行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

谁能帮我. 我有一个下拉列表,上面有一些非常大的文字要显示. 因此我的文本无法完全显示在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

更多推荐

如何在下拉菜单中将文本分成两行

本文发布于:2023-10-30 00:12:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1541182.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中将   两行   菜单   文本   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!