1

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.

Votes + Comments
well written thread question. :)
4
Contributors
9
Replies
10
Views
7 Years
Discussion Span
Last Post by xVent
0

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 :)

0

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.:)

0

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
0

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.

0

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.

0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.