Subject | paiting grid |
---|---|
Author | james_027 |
Post date | 2003-10-02T10:31:50Z |
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
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