Y
yinchen
Unregistered / Unconfirmed
GUEST, unregistred user!
学习中……
有个动态创建的Label1有个PopupMenu,
procedure TForm1.Button1Click(Sender: TObject);
var
Label1:Tlabel;
begin
label1:=Tlabel.Create(self);
label1.Parent:=Form1;
label1.Top:=200;
label1.Left:=200;
label1.Caption:='getLabelName';
label1.PopupMenu:=PopupMenu1;
end;
procedure TForm1.N1Click(Sender: TObject);
begin
// 获取Label的name
//?????
//
end;
有个动态创建的Label1有个PopupMenu,
procedure TForm1.Button1Click(Sender: TObject);
var
Label1:Tlabel;
begin
label1:=Tlabel.Create(self);
label1.Parent:=Form1;
label1.Top:=200;
label1.Left:=200;
label1.Caption:='getLabelName';
label1.PopupMenu:=PopupMenu1;
end;
procedure TForm1.N1Click(Sender: TObject);
begin
// 获取Label的name
//?????
//
end;