I have to work on MS excel to manage data. My excel sheet and data looks like this-
In the above image you can see that I have used two colors in rows. One color is sky blue which indicates the positive entry. Namely, if the value in column L is positive then it turns the color of entire row to sky blue. On the other hand if the value in column L is negative then it will turn the color of entire row to orange. The same thing i want to do with ListView.
I have these codes-
Code: Select all
xl:=comobjactive("excel.application")
lastrow:=15
gui,font, s15
Gui, Add, ListView, r20 w700 grid, 1|1|10|10|20|50|100|200|500|2000|Total
loop 8
{
LV_Add(col10,Round(xl.range("b" lastrow).value),Round(xl.range("c" lastrow).value),Round(xl.range("d" lastrow).value),Round(xl.range("e" lastrow).value),Round(xl.range("f" lastrow).value),Round(xl.range("g" lastrow).value),Round(xl.range("h" lastrow).value),Round(xl.range("i" lastrow).value),Round(xl.range("j" lastrow).value),Round(xl.range("k" lastrow).value),Round(xl.range("l" lastrow).value))
LastRow++
}
p:=1
loop 11
{
LV_ModifyCol(p,"AutoHDR")
p++
}
gui,Show
Now, I want to make it in similar color like excel sheet i.e. row number 2 and row number 5 which are containing negative values should turn to orange color. While all other rows except row 2 and row 5 contain positive values so they should turn to sky blue color.
How to create that effect in ListView?
Please help and guide..
Thanks a lot..