String.Format make stringBold [英] String.Format make stringBold
本文介绍了String.Format make stringBold的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello All,
i有string =Text;
有人可以帮我吗如何在String.Format({},Text)中制作文字粗体......)
提前感谢
Hello All,
i have string="Text";
can anyone help me please how to make Text Bold in String.Format({},"Text"))......
thanks in advance
推荐答案
你不能。
字符串没有格式信息:所有功能,如粗体,下划线,斜体等都是显示设备的功能而不是文本本身,并且将字符串显示为粗体的确切要求取决于您用于显示它的确切内容。
文本文件没有任何格式化信息 - 它们都不是粗体或加下划线的 - 但它包含的文本可能包含可由特定显示设备解释的格式信息。对于网站,这通常表示包含HTML的文本:
You can't.
Strings do not have formatting information: all "features" such as Bold, Underline, Italic and so forth are functions of the display device, not of the text itself, and the exact requirements to display a string as Bold depend on exactly what you are using to display it.
A text file does not have any formatting information - none of it is Bold, or underlined - but the text it contains may contain formatting information that can be interpretted by a particular display device. For websites, that generally means the text containing HTML:
Hello: <b>Bold</b>
但对于Rich Text控件可能是:
But for Rich Text controls that might be:
{\rtf1\ansi Hello: \b Bold\b0.}
还有负载和大量其他方式来表明这一点!
And there are loads and loads of other ways to indicate this!
这篇关于String.Format make stringBold的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文