[Lazarus] Brush color on TListView
Kaj Mikkelsen
laz at vgdata.dk
Thu Sep 13 09:45:06 CEST 2012
Try using the PrepareCanvas event.
Something loke:
procedure TArpDatForm.SG1PrepareCanvas(sender: TObject; aCol, aRow: Integer;
aState: TGridDrawState);
Var
St:String;
begin
SG1.Canvas.brush.color := clWhite;
If aCol = 4 Then
Begin
St := SG1.Cells[4,arow];
St := Copy(St,1,pos('.',st)-1);
If (SG1.Cells[3,aRow] <> St) Then
Begin
SG1.Canvas.Brush.color := clRed;
end;
End;
end;
From: Alexsander Rosa [mailto:alexsander.rosa at gmail.com]
Sent: 12. september 2012 22:34
To: Lazarus mailing list
Subject: [Lazarus] Brush color on TListView
I was using a TStringGrid to show some data but I need the "non-linear
multi-select" from TListView.
However, the tricks to set Brush color inside of OnCustomDraw or
OnAdvancedCustomDraw do not work.
Am I missing something? How is it done?
--
Atenciosamente,
Alexsander da Rosa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120913/48b6855a/attachment-0003.html>
More information about the Lazarus
mailing list