帮忙看看这个过程里加函数的写法,不懂啥意思。能给解释一下吗?procedure TfrmMain.gridOwnerDrawDrawCell
(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
//Make some text to display in cell
function GetText(ACol, ARow: integer): string;
begin
if ARow = 0 then
result := format('Header %d', [ACol])
end;
var
txtRect: TRect;
str: string;
begin
//If header is to be drawn:
end;这个是咋执行的?
(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
//Make some text to display in cell
function GetText(ACol, ARow: integer): string;
begin
if ARow = 0 then
result := format('Header %d', [ACol])
end;
var
txtRect: TRect;
str: string;
begin
//If header is to be drawn:
end;这个是咋执行的?
函数GetText就是专门给gridOwnerDrawDrawCell调用的var
txtRect: TRect;
str: string;
begin
//If header is to be drawn:
//这之间肯定有gettext函数的调用
end;