0

Windows forms .net 4.0 vb application. This is a small trivial thing but I was trying to just change the color of one word in label.text. But its not happening and I have a strong feeling that to make it happen is going to be more extensive than its worth... A snippet of what I am trying to use is below... Am I just missing a key detail or is this honestly more of a burden than its worth..

    Dim _changeLabel1 As String = " Note Fields Marked in "
    Dim _changeLabel2 As String = " are Required"
    Dim _attrib As New Label
    With _attrib
        .ForeColor = Color.Red
        .Text = "RED"
    End With
    _notificationLabel1.Text = _changeLabel1 + " " + _attrib.Text + " " + _changeLabel2
Skindeep2366
  • 1,549
  • 3
  • 41
  • 68

1 Answers1

3

Winform labels don't support this functionality, unfortunately.

You could use multiple labels instead, with one that's red for your RED text.

Here's a related question on the matter.

Community
  • 1
  • 1
Msonic
  • 1,456
  • 15
  • 25
  • Thanks much I was thinking about it but it seemed like a lazy work around... I will mark ya as accepted in a bit... – Skindeep2366 Apr 19 '12 at 17:39