procedure TForm1.Button1Click(Sender: TObject);
var
t : Tedit;
begin
t :=Tedit.create(self);
with t do begin
parent := self;
width := 100;
height := 20;
name := 'text123';
captiom:='aaa';
top := 100;
left := 50;
show; end;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
在这里符值。
end;
单击button1,创建控件。单击button2,怎样把创建的控件text123内容,符给edit2.text?
var
t : Tedit;
begin
t :=Tedit.create(self);
with t do begin
parent := self;
width := 100;
height := 20;
name := 'text123';
captiom:='aaa';
top := 100;
left := 50;
show; end;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
在这里符值。
end;
单击button1,创建控件。单击button2,怎样把创建的控件text123内容,符给edit2.text?
解决方案 »
- mysql + unidac 将a表(服务器)复制到b表(客户端)
- 从Delphi7升级到Delphi2010后串口编程发码问题
- 用delphi如何实现 将数据发布到网页上?
- cxgrid控制插入重复记录的问题
- 高手,请教几个小问题?
- 如何使用SHFileOperation函数在Delphi中彻底删除文件夹?
- 就名啊,把我难住了: 如何将DBLookupCombobox控件初始化为数据源的第一条记录字段的内容?
- StringGrid有否单击某一列的特定一个单元格的事件?
- delphi有无宏替换功能?
- 求教QRGroup控件的用法,急!!!
- 高手帮帮忙,fastreport边生成报表文件边传输到打印机
- 关于取字符串的问题,特急
var
t : Tedit;
begin
t :=Tedit.create(self);
with t do begin
parent := self;
width := 100;
height := 20;
name := 'text123';
captiom:='aaa';
top := 100;
left := 50;
show; end;
end;在該過程中,t : Tedit只是一個局部變量存在,而其它地方是訪問不了t的要解決這一問題,可以設置t為全局變量,或者用另一個tedit對象把其值引出來
IF (FindComponent('Text123')<>nil) And (FindComponent('Text123') Is TEdit) Then
Edit2.Text:=(FindComponent('Text123') As TEdit).Text;
IF (FindComponent('Text123')<>nil) And (FindComponent('Text123') Is TEdit) Then
Edit2.Text:=(FindComponent('Text123') As TEdit).Text;
IF (FindComponent('Text123')<>nil) And (FindComponent('Text123') Is TEdit) Then
Edit2.Text:=(FindComponent('Text123') As TEdit).Text;