The event will fire for every visible row, even if you don’t have that many rows added… If you do .AddRow ten times, but your listbox’s height is enough that twelve rows will be visible, the event will be called twelve times…
if (column = 2) AND (row < me.ListCount) AND (not me.RowIsFolder(row)) then
g.forecolor=&cff0000
g.DrawRect 1,1,g.width-2,g.height-2
end
This will only draw the rect for the rows you added… Not too certain how you want to handle blank rows…
[quote=178395:@shao sean]The event will fire for every visible row, even if you don’t have that many rows added… If you do .AddRow ten times, but your listbox’s height is enough that twelve rows will be visible, the event will be called twelve times…
if (column = 2) AND (row < me.ListCount) AND (not me.RowIsFolder(row)) then
g.forecolor=&cff0000
g.DrawRect 1,1,g.width-2,g.height-2
end
This will only draw the rect for the rows you added… Not too certain how you want to handle blank rows…[/quote]
Perfect thanks.