Re: TZF - TzGrid - Color of Current Row
Eitan Gilboa <[email protected]> Sun, 13 Jul 2003 21:47:39 +0200
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Bob and Benno,
Here is an example of alternating colours (Thank you Charlie Chambers !!!)
procedure TForm1.TzGrid1ChangeColorsEvent(Sender: TObject; curRow: Integer;
var IndicatorColor, CellColor, CellTextColor, HiliteColor,
HiliteTextColor, DeletedColor, DeletedTextColor: TColor);
begin
With (sender as TTzGrid) do begin
if (CurRow MOD 2)=0 then begin
CellColor:=$00B3F8FF;
HiliteColor:=$00B3F8FF;
CellTextColor:=clBlack;
HiliteTextColor:=clBlack;
end
else begin
CellColor:=$00E1E1C6;
HiliteColor:=$00E1E1C6;
CellTextColor:=clBlack;
HiliteTextColor:=clBlack;
end;
end;
if TzDbf1.Deleted then begin
if (curRow MOD 2)=0 then begin
DeletedColor:=$00B3F8FF;
HiliteColor:=$00B3F8FF;
CellTextColor:=clBlack;
HiliteTextColor:=clBlack;
end
else begin
DeletedColor:=$00E1E1C6;
HiliteColor:=$00E1E1C6;
CellTextColor:=clBlack;
HiliteTextColor:=clBlack;
end;
end;
end;
Best wishes,
Eitan.
URL: http://perso.wanadoo.fr/eitang
==^================================================================
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
==^================================================================