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

Checked Listbox Text Color

P: n/a
I am looping throught the items in a checked list box. If it helps, all
of the items are checked. If I string of text matches a certain
criteria I would like to change it's text color to red. I know this is
incorrect, but something like so:

If clbFinalList.Items(intLoopCount) = strBadA(x) Then
clbFinalList.Items(x).forecolor = Color.Red
End If

What is the proper syntax to accomplish this?

Thank you,
John

May 26 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Assuming you're talking about the System.Windows.Forms.CheckedListBox class
then there is no built in support for that. You would have to ownerdraw it.
Consider using a ListView instead.

/claes

"jcrouse" <jc******@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
I am looping throught the items in a checked list box. If it helps, all
of the items are checked. If I string of text matches a certain
criteria I would like to change it's text color to red. I know this is
incorrect, but something like so:

If clbFinalList.Items(intLoopCount) = strBadA(x) Then
clbFinalList.Items(x).forecolor = Color.Red
End If

What is the proper syntax to accomplish this?

Thank you,
John

May 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.