B
beckzd
Unregistered / Unconfirmed
GUEST, unregistred user!
帮我看看下面的代码什么意思。
procedure gridDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var cy,cx:integer;
txt:String;
style:string;
i,j,k:integer;
R,D,L,U:integer;
TxtLeft,TxtTop,TxtBottom,TxtRight:integer;
MyREct:Trect;
function GetCol(Acol,Arow:integer):String;
var i:integer;
Mypos:integer;
MyString:String;
begin
MyString:=TSTringGrid(Sender).cells[acol,0];
for i:=0 to Arow do
begin
myPos:=pos('|',MyString)-1;
if Mypos<0 then
begin
REsult:=MyString;
exit;
end;
if pos('|',MyString)<>1 then
Result:=copy(MyString,1,Mypos);
Mystring:=copy(Mystring,Mypos+2,length(MyString));
end;
end;
procedure gridDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var cy,cx:integer;
txt:String;
style:string;
i,j,k:integer;
R,D,L,U:integer;
TxtLeft,TxtTop,TxtBottom,TxtRight:integer;
MyREct:Trect;
function GetCol(Acol,Arow:integer):String;
var i:integer;
Mypos:integer;
MyString:String;
begin
MyString:=TSTringGrid(Sender).cells[acol,0];
for i:=0 to Arow do
begin
myPos:=pos('|',MyString)-1;
if Mypos<0 then
begin
REsult:=MyString;
exit;
end;
if pos('|',MyString)<>1 then
Result:=copy(MyString,1,Mypos);
Mystring:=copy(Mystring,Mypos+2,length(MyString));
end;
end;