开发者

changing color of the part of label.text

How can i change color of just specific part of the label.text in visual basic 2010 express?

Dim b As Integer = 34

label.Text = "You have " & b.ToString & " new items"

for 开发者_运维问答example, i just want to change color of the "b" here.

or do i need to create a new label ?

Thanks


Assuming this is Windows Forms: you need to create a new label.

If it's WPF, you can do it by using a TextBlock with Run elements inside it, and setting the foreground of one of the Run elements.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜