如何在列表框中将项目文本的一部分设置为粗体? [英] How to set part of the item text bold in listbox?

查看:108
本文介绍了如何在列表框中将项目文本的一部分设置为粗体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在列表框项中将文本的部分设置为粗体.....
你能帮我...吗?


(我的编辑... Txt讲的是白痴)

I want to set the part of the text bold in the listbox item.....
Can you please help me...?


(my edit...Txt speak is for morons)

推荐答案

找到了这个
Found this post. Maybe it can help you.

UPDATE SM: I really doubt that this is feasible. List items cannot take those formatting. They will appear as is.


<强< /strong>
只需将它们围绕在要突出显示的位置即可.

(对不起,Abhinav,应该先阅读您的答案,您的答案更好,所以加了标记)

UPDATE SM:我真的怀疑这是否可行.列表项不能采用这些格式.它们将按原样显示.

DD说...尝试ListViewItem,这是一个
链接 [ ^ ].

更新2 SM:首先,这是一个ASP.NET问题.可能是因为我们可以在Windows中以某种方式重绘文本(不确定,链接没有太大帮助),但对于Web来说肯定对我而言似乎不可行.
< strong > < /strong >
just put them round the bit you want highlighting.

(Sorry Abhinav, should have read your answer first, yours is better, so marked up)

UPDATE SM: I really doubt that this is feasible. List items cannot take those formatting. They will appear as is.

DD Says...Try ListViewItem here is a link[^].

UPDATE 2 SM: First of all it is a ASP.NET issue. Might be we can redraw the text somehow in windows(not sure of, link wasn''t helpful much), but surely doesn''t look feasible in Web to me.


我不知道认为不可能.具有文本格式需要丰富的文本框控件. Listbox(ListItems)不是该类型之一.我真的怀疑,这是可行的.

如果您确实需要它,可以考虑制作一个自定义控件,其中列表项为Richtextboxes!
I don''t think that''s possible. Having a text formatting needs a rich-textbox sort of control. Listbox(ListItems) are not one of that type. I really doubt, this is feasible.

If you really need it, might think of making a custom control where list items are richtextboxes!


这篇关于如何在列表框中将项目文本的一部分设置为粗体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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