By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,190 Members | 2,204 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,190 IT Pros & Developers. It's quick & easy.

Is there a way to set a specific color for each line in a label

P: 91
Is there any way to change the colors of different lines in a label/textbox?

For example, the default text color is black. I want to have the first line of the label text black, the second red, then set it back to black for the last one.

Reason i'm trying to do this is I have a calendar form, with boxes (labels) for each day of the month. Each day will have a few items on it, and I want to be able to control the colors so I can make important tasks stand out from the regular black ones.

OR is there a better way to do what i'm trying to accomplish?
Aug 9 '10 #1
Share this Question
Share on Google+
1 Reply


Expert Mod 2.5K+
P: 2,545
The color of the label text or of a textbox and its background can be changed, but not of parts of the text within it.

The normal way to do what you wish to do is to use a separate label or textbox for each component of the form, so that under programme control the relevant part of the form can be highlighted accordingly.

-Stewart
Aug 10 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.