如何更改字符串值的字体 [英] How to change font of string value

查看:94
本文介绍了如何更改字符串值的字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

var z6 = dtTree.Rows[0]["Addres"].ToString();


我希望z6的值是粗体和红色.


i want that value z6 were bold and red. How do it?

推荐答案

字符串只是一堆字符,没有颜色,没有字体,没有什么多余的东西.因此,您无法更改字符串的字体.您应该做的是在控件中定义所需的文本属性,例如,如果您正在使用控件来显示文本.
String is simply just a bunch of characters, no color, no font, nothing extra. So you cannot change the font of the string. What you should do is to define the desired properties of the text for example in a control, if you''re using a control to show the text.


这篇关于如何更改字符串值的字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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