在 Delphi 中能动态创建组件(按钮)吗? 如果能请举例. 在 Delphi 中能动态创建组件(按钮)吗? 如果能请举例. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 with tbutton.create(self) dobegin parent := self; caption := 'sdaf';end; procedure TForm1.Button1Click(Sender: TObject);var newbutton : TButton;begin newbutton := TButton.Create(self); newbutton.Parent := self; newbutton.Left := 100; newbutton.Top := 100; newbutton.Caption := 'newbutton';end; var btn:Tbutton;begin btn:=Tbutton.Create(self); btn.Parent:=self; btn.Left:=100; btn.Top:=100; btn.Height:=100; btn.Width:=200; btn.Caption:='我是动态创建的'; 谢谢!其它的组件也应该可以吧?我打算做一个通用窗口,有一个要多几个组件.而且那些组件又没有 visible 属性,所以我想动态创建. 声明 procedure bc(Sender: TObject);写事件代码procedure TForm1.bc(Sender: TObject);begin showmessage('ok');end;连接事件btn:Tbutton;begin btn:=Tbutton.Create(self); btn.Parent:=self; btn.Left:=100; btn.Top:=100; btn.Height:=100; btn.Width:=200; btn.Caption:='123'; btn.OnClick:=bc; 同意zhaojinghui(撒哈拉之雨的悲伤)的说法!我迟到了!现在,我只好帮你顶 最好写在form.close事件里一般象什么数据集关闭时还有变量释放时都在这里写 一直纳闷的问题,软件做成三层结构到底有什么好处呢? 求购无时间限制的录音程序原代码 请问如何控制socket的数据传输速率? 问题4 一个很急的问题!100分在线等待 怎样把MDI母子窗口的TOOLBAR 合并到一快呢?500分等你拿 大家帮帮我啊,我真的要你们的帮助 高手来吧 又写了一个程序,是对文件进行加密的,支持Blowfish,Twofish等6种算法 各位大侠,你们好, 我需要在人事管理系统中,输入照片,不知用哪种摄像头比较好,35分! 在Delphi7中能不能用gif图像做背景? 如何用函数将中文转化成拼音(回答就有分)
begin
parent := self;
caption := 'sdaf';
end;
var
newbutton : TButton;
begin
newbutton := TButton.Create(self);
newbutton.Parent := self;
newbutton.Left := 100;
newbutton.Top := 100;
newbutton.Caption := 'newbutton';
end;
begin
btn:=Tbutton.Create(self);
btn.Parent:=self;
btn.Left:=100;
btn.Top:=100;
btn.Height:=100;
btn.Width:=200;
btn.Caption:='我是动态创建的';
写事件代码
procedure TForm1.bc(Sender: TObject);
begin
showmessage('ok');
end;连接事件btn:Tbutton;
begin
btn:=Tbutton.Create(self);
btn.Parent:=self;
btn.Left:=100;
btn.Top:=100;
btn.Height:=100;
btn.Width:=200;
btn.Caption:='123';
btn.OnClick:=bc;
我迟到了!
现在,我只好帮你顶
一般象什么数据集关闭时还有变量释放时都在这里写