procedure Twgift_shell.grid_giftDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
var
iexpr:string ;
begin
if datacol=0 then IEXPR:=xperson.t_subgift.FIELDBYNAME('codename').asstring ;
if length(xperson.t_subgift.FIELDBYNAME('kcode').asstring)<7 then
begin
grid_gift.Canvas.brush.Color := $004080FF ;
grid_gift.Canvas.Font.Color := clyellow ;
end ;
IF datacol=0 THEN
begin
grid_gift.Canvas.FillRect(Rect);
grid_gift.Canvas.TextOut(Rect.Left,Rect.Top, IEXPR) ;
end
else
realtoright(xperson.t_subgift.FIELDBYNAME('weeksum').asfloat,grid_gift,rect) ;
end;
procedure Twgift_shell.grid_giftDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
var
iexpr:string ;
begin
if datacol=0 then IEXPR:=xperson.t_subgift.FIELDBYNAME('codename').asstring ;
if length(xperson.t_subgift.FIELDBYNAME('kcode').asstring)<7 then
begin
grid_gift.Canvas.brush.Color := $004080FF ;
grid_gift.Canvas.Font.Color := clyellow ;
end ;
IF datacol=0 THEN
begin
grid_gift.Canvas.FillRect(Rect);
grid_gift.Canvas.TextOut(Rect.Left,Rect.Top, IEXPR) ;
end
else
realtoright(xperson.t_subgift.FIELDBYNAME('weeksum').asfloat,grid_gift,rect) ;
end;