Hello,
It might be easier to maintain if you used the ListBox's CellTag
functionality instead, and assigned a object holding the information
you need, rather than using 11 extra columns.
Thanks,
Navdeep Bains
Bains Software
On May 4, 2006, at 7:32 AM, Wade Little wrote:
Thanks for you help here Thom! I eventually ended up adding an
extra 11 columns to support how I wanted this to work and putting
information in those columns....
I then used a modified version of what you sent to set
colors....Thanks ago for your help it was really appreciated! -Wade
Dim rowCompletedColumn, i As Integer
for i=0 to 10
rowCompletedColumn = i+14
if row < me.listcount then
if column = i+3 then
if me.cell(row,rowCompletedColumn) = "1" then
g.forecolor = &c00FF00
ElseIf me.cell(row,rowCompletedColumn) = "0" then
g.forecolor = &cFF0000
else
g.ForeColor= &cFFFFFF
end
g.fillrect 0,0,g.width,g.height
end if
end if
next
On May 3, 2006, at 8:04 PM, Thom McGrath wrote:
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>
_______________________________________________
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>
_______________________________________________
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>