在Label中制作一些粗体文本 [英] Make some Text as Bold in Label
问题描述
Label1.Text =普通文字
Label1.Text& =BOLD TEXT
Label1.Text& =普通文字>
是否有一种方法可以使我的字符串的一部分在标签文本中变为粗体,如上所述我希望第二行只是粗体
输出:
普通文本
BOLD TEXT
普通文字
我试过以下但是没有用:
Label1.Text& =< b> BOLD TEXT< / b>
Label1.Text = "Normal Text"
Label1.Text &= "BOLD TEXT"
Label1.Text &= "Normal Text"
is there a way that make part of my string as bold in Label text like aabove I want the second line to be bold only
Output:
Normal Text
BOLD TEXT
Normal Text
I tried the below and it didn't work:
Label1.Text &= "< b>BOLD TEXT< /b>"
推荐答案
它对我有用:
只需在文本周围使用b标签。
It works for me :
just use b tag around the text.
Label1.Text = "Normal Text"
Label1.Text &= "<b>BOLD TEXT</b>"
Label1.Text &= "Normal Text"
希望它也适合你。
它不允许我写b标签。它以粗体文字变化,你可以看到'BOLD TEXT'。
现在它显示正确。感谢Rohan的帮助。
祝你好运。
Hope it works for you too.
It is not allowing me to write b tag. it changes in bold text you can see 'BOLD TEXT'.
Now it's showing correctly. Thanks Rohan for your help.
Good luck.
这篇关于在Label中制作一些粗体文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!