Subject Getting the fieldname
Author lee@leeway-be.com
Hi,

call me stupid, but I need to know the correct way to get the
fieldname of a table.

I am in a grid and i want to change the (e.g) color of a cel
depending on a specific field.
The name of the table is ADR and the name of the field is NAME.
I am monitoring the drawing of the cel in a TIB_Grid.
How can I see if the cel to be painted is displaying the value of the
field ADR.NAME ?

snipped (or is it snippid ?)
{
procedure TMain.IB_Grid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var NewRect: TRect;
begin
if (here do I have to know if this cel is ADR.NAME) then
begin
with Sender as TIB_Grid, Canvas do
begin
NewRect := Rect;
NewRect.Left := NewRect.Left;
NewRect.Right := NewRect.Left + 1;
Font.Color := clRed;
Brush.Color := clBlue;
FillRect(NewRect);
end;
end;
end;
}
end snippid

regards

Lee