Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chnage the font colour of a single listbox item

Status
Not open for further replies.

newora

Programmer
Aug 19, 2003
133
GB
Hi All,

I wonder if anyone could please help me - I have tried searching and not come up with anything.

I have a listbox which can be populated with between 1 and 100 items. What I wish to do is change the font colour (and maybe also make it bold) of an individual item in the listbox (the condition will be based on a external query) but the problem that I seem to have is that I can only change the colour / font of all of the items in the listbox at once, not an invididual item in the list.

If anyone could point me in the right diorection, it would be much appreciated.

Thanks
 
I think you would have to use the ListIndex() function to specify which one you want to change.
 
Thanks for that, yes thats were I started, using the listindex property to index into the actual listbox list, as it were but I get an invalid qualifier error
 
I'm not sure this is possible without a third party control.
 
It isn't - well, unless you subclass it and turn it into an OwnerDraw listbox ...

You might want to try looking at the ListView control in List mode, which allows you to do what you describe
 
I believe you need to look at Componenet One Studio. A collection of 3rd party controls. Very nice investment from the GUI develpement stand point.


Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Thats great thank guys for your input
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top