Hello ,

I have a label on my code and i have 3 lines on it , what i want to do is to have my first line on white color and bold , next line normal white and third line on yellow normal ..

still searching for a solution.

Thanks.

Comments
well written thread question. :)

at the moment i have the text without the colors i need on the label, i dont think its something it needs to be shared... simple text :)

Hello ,

I have a label on my code and i have 3 lines on it , what i want to do is to have my first line on white color and bold , next line normal white and third line on yellow normal ..

still searching for a solution.

Thanks.

If you are using similar code from your other thread, why not add a panel that contains 3 labels, each with your preset fonts/colors, and set the panel to visible/not visible as needed?
Setting "Panel1.AutoSize = True" should also help.:)

Something else that might help if you use 1 Panel and 3 Labels.

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Panel1.Visible = True
        myCoolInfo("Label1.Text here.", "Label2.Text here.", "Label3.Text here.")
    End Sub
    Sub myCoolInfo(ByRef myCoolInfo_1 As String, ByRef myCoolInfo_2 As String, ByRef myCoolInfo_3 As String)
        Label1.Text = myCoolInfo_1
        Label2.Text = myCoolInfo_2
        Label3.Text = myCoolInfo_3
    End Sub
End Class

Code order, although your idea is right, this is not what xVent needs. He wants to make Line1 in LABEL1 white, line 2 in LABEL1 red, Line3 in LABEL1 blue etc. Your code shows the colour per label on different labels and not the lines in one label.

Code order, although your idea is right, this is not what xVent needs. He wants to make Line1 in LABEL1 white, line 2 in LABEL1 red, Line3 in LABEL1 blue etc. Your code shows the colour per label on different labels and not the lines in one label.

I figured that much, but for a simple solution that relates to his other thread, it should help.

thats a solution but since i wanna add some more code for the labels... for example i want it to show the x message before i click the label and after the click i want the text on the labels to change to y .. it may work.. ill try it.

Thanks

This article has been dead for over six months. Start a new discussion instead.