• 0

[VB.NET] Multicolor label ?


Question

Hello,

I want to have multiple colors in a label ( black and red for the required * star ).. I tried to create a RichTextBox with no border/ReadOnly=true/Enabled=False .. and format the text through code, it worked. But sadly I can't change the BackColor of "Disabled" Controls.

I can put multiple labels but that would be a bit silly. Anybody knows a solution for this?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

@thevink, nop, disabled controls automatically gets their backcolors changed.

@night_stalker_z, forecolor has nothing to do with backcolor ( it only changes the text color )

Link to comment
Share on other sites

  • 0

Well I'm not sure how they operate on 'Buttons' and 'Labels'. If you read my first post again you'll realize my real problem which have to do with Multicoloring and Richtextbox's

Link to comment
Share on other sites

  • 0

The first sentence states you have a problem with a label and the second one states you tried to do it with a RichTextBox.

Are you looking for something like the Google logo where each letter is a different colour?

Link to comment
Share on other sites

  • 0

Yes, Kinda like that. Example: ( Name *: ). If you know a way to display such a thing in one label then please show me the code.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.