Hello group, I would like to color the line in which a condition occurs with EvidenziaLine=true, but I can only color the cell … The problem certainly depends on PaintCellBackGround, because from what I understand here a reading is repeated for each line, and therefore the EvidenziaRigo=False is read to me on restart and therefore I only color the cell in which EvidenziaRigo=true. I hope I made myself clear. How can I do to color the whole staff?
Dim EvidenziaRigo as Boolean
EvidenziaRigo=False
if (row>=2 and row<=ListBoxIngressi.RowCount-1) and (column=6 or column=9) then
messagebox "LEggo "+ listboxingressi.CellTextAt(row,6)
Var d1 As DateTime
Var d2 As DateTime
Var ActualDate as datetime=DateTime.Now
if listboxingressi.CellTextAt(row,6)<>"" then
d1 = ConvertToDateTime(listboxingressi.CellTextAt(row,6)) '1° Rata
if ActualDate>d1 and listboxingressi.CellTextAt(row,8)="False" then '8=Pagata?
messagebox ActualDate.SQLDate + " > " + d1.SQLDate + " and " + listboxingressi.CellTextAt(row,8)
EvidenziaRigo=true
else
messagebox ActualDate.SQLDate + " < " + d1.SQLDate + " and " + listboxingressi.CellTextAt(row,8)
EvidenziaRigo=False
if listboxingressi.CellTextAt(row,9)<>"" then
d2 = ConvertToDateTime(listboxingressi.CellTextAt(row,9)) '2° Rata
if ActualDate>d2 and listboxingressi.CellTextAt(row,11)="False" then '11=Pagata?
messagebox ActualDate.SQLDate + " > " + d2.SQLDate + " and " + listboxingressi.CellTextAt(row,11)
EvidenziaRigo=true
else
messagebox ActualDate.SQLDate + " < " + d2.SQLDate + " and " + listboxingressi.CellTextAt(row,11)
EvidenziaRigo=False
end if
end if
end if
end if
end if
if row Mod 2 = 0 Then
if EvidenziaRigo=True then
g.DrawingColor= &cff1100 ' RED
g.FillRectangle(0, 0, g.Width, g.Height)
else
g.DrawingColor= &cf0ffff ' heavenly/celestino
g.FillRectangle(0, 0, g.Width, g.Height)
end if
Else
if EvidenziaRigo=True then
g.DrawingColor= &cff1100 ' RED
g.FillRectangle(0, 0, g.Width, g.Height)
else
g.DrawingColor= &cFFFFFF 'WHITE
g.FillRectangle(0, 0, g.Width, g.Height)
end if
End If
