procedure TForm1.TreeView1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
setlength(mybit,20);
if (ok=true) and (Button=mbLeft) then begin
mypanel:=tpanel.Create(self);
mypanel.Parent:=treeview1;
mypanel.Width:=50;
mypanel.Height:=50;
mypanel.Left:=y-11;
mypanel.top:= x-10;
mypanel.OnMouseDown:=mymousedown;
mypanel.OnMouseMove:=mymousemove;
mypanel.OnMouseUp:=mymouseup;
mybit[count]:=TBitBtn.Create(self);
mybit[count].Parent:=mypanel;
mybit[count].Top:=y-11; { 加多这句和下句为什么无法在mypanel上显示mybit
mybit[count].Left:=x-10; [count]}如何能够正确地调整mybit[]count]在
mybit[count].Width:=41; mypanel上的位置。多谢拉!!
mybit[count].Height:=41;
end;
Shift: TShiftState; X, Y: Integer);
begin
setlength(mybit,20);
if (ok=true) and (Button=mbLeft) then begin
mypanel:=tpanel.Create(self);
mypanel.Parent:=treeview1;
mypanel.Width:=50;
mypanel.Height:=50;
mypanel.Left:=y-11;
mypanel.top:= x-10;
mypanel.OnMouseDown:=mymousedown;
mypanel.OnMouseMove:=mymousemove;
mypanel.OnMouseUp:=mymouseup;
mybit[count]:=TBitBtn.Create(self);
mybit[count].Parent:=mypanel;
mybit[count].Top:=y-11; { 加多这句和下句为什么无法在mypanel上显示mybit
mybit[count].Left:=x-10; [count]}如何能够正确地调整mybit[]count]在
mybit[count].Width:=41; mypanel上的位置。多谢拉!!
mybit[count].Height:=41;
end;
mybit[count]:=TBitBtn.Create(self);
mybit[count].Parent:=mypanel;
mybit[count].Top:=y-11; { 加多这句和下句为什么无法在mypanel上显示mybit
mybit[count].Left:=x-10; [count]}如何能够正确地调整mybit[]count]在
mybit[count].Width:=41; mypanel上的位置。多谢拉!!
mybit[count].Height:=41;
========================================
for i := low(MyBit) to high(MyBiit) do
begin
//DoSomething.
end;
我的目的是想在mypanel上创建一个Tbitbtn控件,
现在需要调整Tbitbtn相对mypanel的位置。多谢拉!!
mybit[count].Left:=1; [count]}如何能够正确地调整mybit[]count]在
如何给你加分噢?