Yeah, you're overlooking something :P
Say your DB has a column called "complete" which could contain "yes"
or "no" - you decide how to color from this information. So you build
your listbox with all your data. One of the columns should contain
the data found in db column "complete". We'll call it column 2 to
match your example. Now, you don't need to display 3 columns, but you
can still use all three. So here we go:
const rowCompletedColumn = 2
if row < me.listcount then
if column = 0 then
if me.cell(row,rowCompletedColumn) = 'yes' then
g.forecolor = &c00FF00
else
g.forecolor = &cFF0000
end
g.fillrect 0,0,g.width,g.height
end
end
Sorry I didn't give you such detail earlier, I had left that as an
"exercise to the reader"
--
Thom McGrath
The ZAZ Studios
<http://www.thezaz.com/> AIM: thezazstudios
On May 3, 2006, at 10:46 PM, Wade Little wrote:
I see what you have done here but what the color of each cell is
dynamic and will change so if I hardcode this in the
cellbackgroundpaint event it wont work......
Basically I run an SQL query and if it tells the cell is done I
turn it green and if it is not done I turn it red. The data in the
cells and the color is very dynamic so I dont see how I can make
this work based on hardcoding this in the cellbackgroundPaint
event......
Sorry if I am being silly about this and overlooking the obvious I
just dont seem to understand.....
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>