I'm using a ListView as a way of implementing a "Processing Console" for an app (and also saving it as a Logfile). The code is very simple:
Code: Select all
RowNumber:=LV_Add("",LogfileRecord) ; write record to Processing Console
LV_Modify(RowNumber,"Vis") ; scroll LV so newly added last row is visible
That works fine, but here's the problem. The output in the LV should be in red if the first character of the record is an asterisk, otherwise in green. I thought this code before the
LV_Add and
LV_Modify would do the trick:
Code: Select all
If (SubStr(LogfileRecord,1,1)="*")
{
Gui,Font,bold s10 cFF0000,Arial
GuiControl,Font,LogfileListView
}
Else
{
Gui,Font,bold s10 c00FF00,Arial
GuiControl,Font,LogfileListView
}
But that doesn't work — it changes all of the rows in the LV to red or green. How can I specify the color of only the most recently added row? Thanks much, Joe