0

Windows 窗体 .net 4.0 vb 应用程序。这是一件小事,但我试图改变 label.text 中一个单词的颜色。但它没有发生,我有一种强烈的感觉,要让它发生,它的价值将比它的价值更广泛......我正在尝试使用的片段如下......我只是错过了一个关键细节还是老实说,这更像是一种负担而不是它的价值..

    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
4

1 回答 1

3

不幸的是,Winform 标签不支持此功能。

您可以改用多个标签,其中一个为红色的RED文本。

这是关于此事的相关问题

于 2012-04-19T17:36:03.827 回答