Is there any way to have different colors for items in listbox (I want to
have some items green, some red, some blue)

Re: Items color in listbox by Gregory

Gregory
Tue May 30 04:41:29 CDT 2006

Anto,

Here's an answer from Cetin Basoz on the ut yesterday

Yes it's possible but not worth the effort In my honest opinion.

Public oForm
oForm = Createobject('myForm')
oForm.Show

Define Class myForm As Form
Add Object myListBox As ListBox With ;
top = 10, Left = 10, Height = 200, Width = 180

Procedure myListBox.Init
Define Popup myPop Font [Arial],12 Style [B]
Define Bar 1 Of myPop Prompt 'element 1' ;
FONT [Arial],12 Style [B] ;
COLOR ,Rgb(,,,212,208,200),,,,Rgb(255,255,255,0,0,128)
Define Bar 2 Of myPop Prompt 'element 2' ;
FONT [Arial],12 Style [BI] ;
COLOR ,Rgb(,,,212,208,200),,,,Rgb(255,255,255,0,0,128)
Define Bar 3 Of myPop Prompt 'element 3' ;
FONT [Arial],12 Style [I] ;
COLOR ,Rgb(255,255,255,255,0,0),,,,Rgb(255,0,0,255,255,0)
Define Bar 4 Of myPop Prompt 'element 4' ;
FONT [Arial],8 ;
COLOR ,Rgb(0,255,0,255,255,0),,,,Rgb(255,0,0,0,255,255)

With This
.RowSourceType = 9
.RowSource = 'myPop'
.ColumnCount = 2
.ColumnLines = .T.
.ColumnWidths = '130,20'
For ix=1 To 4
.List(m.ix,2) = 'C'+Trans(m.ix)
Endfor
Endwith
Endproc
Enddefine


Gregory______________


"Anto Maric" <antomaric@hotmail.com> wrote in
message news:e5h0g1$doc$1@ss408.t-com.hr...
> Is there any way to have different colors for items in listbox (I want to
> have some items green, some red, some blue)
>