Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Congratulations for your great site. This site helped me more than university..."

Geography

Where in the world do Tek-Tips members come from?

ListBox with strings of a different color

BubbaDave (Programmer)
1 Jul 09 21:27
Hi,

I need to insert strings into a TListBox with two characters that are a different color than the rest of the string.

For instance, if my string is "abcdefg", I want to add it to the ListBox with the 'abc' and 'fg' as black and the 'de' as red.

It doesn't necessarily have to be a TListBox. As a matter of fact, my experience with TListBox is that as the list grows longer, it slows down measurably. Maybe I should use something else that will be faster, because there could be possibly thousands of lines to insert.

I guess that's two questions...is there a component that will work faster than a TListBox and can I change the color of a portion of a string in the component?

Thanks for any help on this.
Dave

 

If it aint broke, fix it till it is.

2ffat (Programmer)
2 Jul 09 7:53
See if these article help:
Changing the Text Color of Combo Box or List Box Items

Owner-drawn list boxes

Owner-drawn list boxes
 

James P. Cottingham
I'm number 1,229!
I'm number 1,229!

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close