ListView no Delphi 2007

Delphi

16/09/2008

Tenho o seguinte código em um evento de um listview no delphi 7:





procedure TForm1.Lista1CustomDrawSubItem(Sender: TCustomListView;
Item: TListItem; SubItem: Integer; State: TCustomDrawState;
var DefaultDraw: Boolean);
begin
if (SubItem = 11)and((Item.SubItems[0] = ´´)and(Item.SubItems[8] <> ´--:--´)) then Lista1.Canvas.Font.Color := clRed
else Lista1.Canvas.Font.Color := clBlack;

if SubItem = 11 then
if Item.SubItems[0] = ´´ then Lista1.Canvas.Brush.Color := clMoneyGreen;

if SubItem = 13 then
if PedeTempo(Item.SubItems[0],False) then
Sender.Canvas.Brush.Color := clRed
else
if Item.SubItems[1] = ´´ then
Sender.Canvas.Brush.Color := clMoneyGreen
else Sender.Canvas.Brush.Color := clGreen;

if SubItem = 14 then begin
if Item.SubItems[1] = ´´ then Sender.Canvas.Brush.Color := clMoneyGreen
else begin
If ParaWeb(Item.SubItems[0]) then Sender.Canvas.Brush.Color := clGreen
else Sender.Canvas.Brush.Color := clWindow;
end;
end;
end;





Como vcs podem verificar, este código só faz pintar uma uma célula com uma determinada cor de acordo com algumas condições.

Estou migrando um sistema do delphi 7 para o delphi 2007 e, teoricamente, este código deveria funcionar no delphi 2007, porém não funciona.

Alguém poderia me explicar a razão deste erro?



Desde já agradeço.


Alex Maia

Alex Maia

Curtidas 0
POSTAR