level 2
qq530400415
楼主
procedure TForm1.Button11Click(Sender: TObject);
var
mybutton:TBUtton;
Flag,I:integer;
begin
if mylist <> nil then
begin
flag:= mylist.Count div 2;
for I:= flag to mylist.Count -1 do
begin
mybutton:= mylist.items[I];
mybutton.Top:= (i+i) * 25;
end;
mybutton:=Tbutton.Create(self);
mylist.Insert(flag,mybutton);
showmessage('插入第' + inttostr(flag) + '个位置');
with mybutton do
begin
parent:=self;
top:= flag * 25;
width:= 150;
caption:='使用Insert所加入的新对象';
onclick:= Buttonindexofclick; //这句是什么意思啊?书上是这么写的但是D7无法编译通过!百度又查不到!拆开能理解什么意思,放在一起蒙了!
end;
end
else
showmessage('mylist尚未被创建');
end;
2015年09月26日 03点09分
1
var
mybutton:TBUtton;
Flag,I:integer;
begin
if mylist <> nil then
begin
flag:= mylist.Count div 2;
for I:= flag to mylist.Count -1 do
begin
mybutton:= mylist.items[I];
mybutton.Top:= (i+i) * 25;
end;
mybutton:=Tbutton.Create(self);
mylist.Insert(flag,mybutton);
showmessage('插入第' + inttostr(flag) + '个位置');
with mybutton do
begin
parent:=self;
top:= flag * 25;
width:= 150;
caption:='使用Insert所加入的新对象';
onclick:= Buttonindexofclick; //这句是什么意思啊?书上是这么写的但是D7无法编译通过!百度又查不到!拆开能理解什么意思,放在一起蒙了!
end;
end
else
showmessage('mylist尚未被创建');
end;