eg.
FORM1中有一个EDIT,FORM2中有一个LISTBOX,要双击EDIT就出现FORM,并在FORM2的LISTBOX的LIST中加入FORM1.EDIT.TEXT,关闭FORM2时,使FORM1.EDIT的值为FORM2.LISTBOX中的值,
FORM1中有一个EDIT,FORM2中有一个LISTBOX,要双击EDIT就出现FORM,并在FORM2的LISTBOX的LIST中加入FORM1.EDIT.TEXT,关闭FORM2时,使FORM1.EDIT的值为FORM2.LISTBOX中的值,
解决方案 »
- 请问谁有 delphi7 入门电子书?最好要清晰地,麻烦你们了
- 全分送出。扫描局网ip mac和计算机名的程序
- 如何判断Adoquery1.对应的记录是否是最后一条记录? 指令怎么写?
- 关于多表头DBGridEh导出Excel文件的问题
- 在Delphi7中能不能用gif图像做背景?
- 怎样将6599.99用format变成 6600.谢谢。
- 在delphi中当图片的大小大于picture时,怎样在picture控件中实现两个滚动显示条
- 在线等%% IDHTTP+SSL的问题
- 条件语句:如果数据库表“abc”的某列中含有TEdit1控件的内容,那么条件触发。。。。。!!!!
- 为何在VFP中的操作不能实现?
- 在程序中我用 WinExec 启动了另一个程序,怎样判断该程序什么时候结束!
- 连接
...
public
constructor create(AOwner: TComponent; AStr: string); reintrodure;
...
constructor TForm1.create(AOwner: TComponent; AStr: string);
begin
inherited create(AOwnner); ListBox1.ItemsListBox1.Items.Append(AStr);
end;procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if ListBox1.ItemIndex >= 0 then
Form1.Edit1.Text := ListBox1.Items[ListBox1.ItemIndex]
end;FORM1:
procedure TForm1.Edit1DblClick(Sender: TObject);
var
Form2: TForm2;
begin
Form2 := TForm2.create(self, Edit1.Text);
Form2.Show;
end;其中两个单元之implementation要users彼此
写错了,其应为Form2的,即:
constructor TForm2.create(AOwner: TComponent; AStr: string);
reintrodure;
这个是什么意思啊,我很菜
procedure TForm1.Edit1DblClick(Sender: TObject);
begin
form2.ListBox1.Items.Add(edit1.Text);
form2.show;
end;窗口二中的关闭事件
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if form2.ListBox1.ItemIndex>=0 then
form1.Edit1.Text:=Listbox1.Items[Listbox1.ItemIndex];
end;