Subject Re: [IBO] paiting grid
Author Jason Wharton
It will be fast if you store aside the BufferFieldByName() pointers in local
(to the module) private variables and use those instead.

Jason

----- Original Message -----
From: "james_027" <james_027@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, October 02, 2003 3:31 AM
Subject: [IBO] paiting grid


>
> this is how I paint my grid, I think its wrong because it makes may
> grid so slow, please advice. thanks
>
> if request.Active then
> begin
> if not (gdfixed in AState) then
> begin
> request.BufferRowNum:=ib_grid3.datarow[arow];
> if request.bufferFieldByName('Status').AsString = 'CAN' then
> afont.Color:=clred
> ELSE if request.bufferFieldByName('Status').AsString = 'PAS' then
> afont.Color:=clTEAL
> ELSE if request.bufferFieldByName('Status').AsString = 'OUT' then
> afont.Color:=clOLIVE
> ELSE if request.bufferFieldByName('Status').AsString = 'DIS' then
> afont.Color:=cLFUCHSIA
>
>
> end; // if not astate = gdfixed then
> end; // if request.active then