Board index » cppbuilder » List Box Color

List Box Color


2003-12-22 11:32:25 PM
cppbuilder76
Within a TListBox, can I write one line in a different color than the
others? If so, how?
All I can make happen is to change the color of all the entries in the box.
Thanks,
Pat
 
 

Re:List Box Color

"Pat McClure" < XXXX@XXXXX.COM >wrote in message
Quote
Within a TListBox, can I write one line in a different
color than the others? If so, how?
You need to set the Style property to one of the lbOwnerDraw... values and
then use the OnDrawItem event to render each item onto the ListBox's Canvas
manually.
Gambit
 

Re:List Box Color

Thanks, Gambit -- I'll give it a try! You're super helpful, and as a
beginner I appreciate it.
Thanks you again,
Pat
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Pat McClure" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Within a TListBox, can I write one line in a different
>color than the others? If so, how?

You need to set the Style property to one of the lbOwnerDraw... values and
then use the OnDrawItem event to render each item onto the ListBox's
Canvas
manually.


Gambit


 

{smallsort}