Subject RE: [IBO] How to change Color of selected (=highlited) row ?
Author Ralf Reddemann
-----Original Message-----
From: Clare Coleman [mailto:ibobjects@...]
Sent: Tuesday, June 12, 2001 5:01 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] How to change Color of selected (=highlited) row ?


Have you tried changing the grid property
CurrentRowColor

I did, with no success.

The situation is as follows:

The Grid is only readonly and just for browsing so I set "RowSelected=true".

Method for GetCellProps (working):

---snip----
[...]
iOtherPilot := BufferFieldByName('OTHERPILOT').AsInteger;
if BufferRowNum > 0 then begin
if tsAbgang.TabIndex = 2 then
begin
if iOtherPilot > 0 then
begin
if AColor = dbGridAbgang.Color then AColor := clYellow;
if AFont.Color = dbGridAbgang.Font.Color then AFont.Color :=
clRed;
end;
exit;
end;
[...]
---snap----



and I want to do something like this (not working):

---snip----
[...]
iOtherPilot := BufferFieldByName('OTHERPILOT').AsInteger;
if BufferRowNum > 0 then begin
if tsAbgang.TabIndex = 2 then
begin
if iOtherPilot > 0 then
begin
if AState = [gdSelected] then
begin
if AColor = dbGridAbgang.Color then AColor := clRed;
if AFont.Color = dbGridAbgang.Font.Color then AFont.Color :=
clYellow;
end
else
begin
if AColor = dbGridAbgang.Color then AColor := clYellow;
if AFont.Color = dbGridAbgang.Font.Color then AFont.Color :=
clRed;
end
end;
exit;
end;
[...]---snap----

Regards

R. Reddemann