Subject | problem with TIB_Grid.GetCellProperties |
---|---|
Author | Wolfgang Rohdewald |
Post date | 2006-11-23T21:29:17Z |
Hi,
with the following code, when I move up or down in the grid, the
field getting focus is painted in the color of the row that had
focus before.
How can I access the fields of the new row ARow which gets focus?
procedure TfrmVPro.DgrGetCellProps(Sender: TObject; ACol, ARow: Integer;
AState: TGridDrawState; var AColor: TColor; AFont: TFont);
begin
inherited;
if ARow=0 then Exit;
if not DSet.Prepared then Exit;
if DSet.BufferFieldByName('OK').Value='F' then
AColor := clRed;
end;
--
Wolfgang
with the following code, when I move up or down in the grid, the
field getting focus is painted in the color of the row that had
focus before.
How can I access the fields of the new row ARow which gets focus?
procedure TfrmVPro.DgrGetCellProps(Sender: TObject; ACol, ARow: Integer;
AState: TGridDrawState; var AColor: TColor; AFont: TFont);
begin
inherited;
if ARow=0 then Exit;
if not DSet.Prepared then Exit;
if DSet.BufferFieldByName('OK').Value='F' then
AColor := clRed;
end;
--
Wolfgang