我想实现把Edit1中的文本增加到ListBox1中,
在把Edit1中的文本清空!
procedure TForm1.Button1Click(Sender: TObject);
begin
ListBox1.Items.Add(Edit1.text);Edit1.Text:= '';
end;
[Error] Unit1.pas(36): Declaration expected but end of file found
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'
不能在'Unit1.pas'单元中找到是什么意思?
在把Edit1中的文本清空!
procedure TForm1.Button1Click(Sender: TObject);
begin
ListBox1.Items.Add(Edit1.text);Edit1.Text:= '';
end;
[Error] Unit1.pas(36): Declaration expected but end of file found
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas'
不能在'Unit1.pas'单元中找到是什么意思?
解决方案 »
- 求两表查询语句
- 数据库明明有,但是ADOquery查询不到
- C++ 的DLL库中的类如何在delphi中实例化
- 问两个sql server考试题目(明天要交卷了,还做不出来,急急急)
- 有关《Delphi 高手突破》一书的问题,很基础的,这分好挣啊(在线等待!)
- 为什么不能产生自己的异常?进来看看
- !!!哪为兄弟知道如何在win2000下对并口数据的读写,赶快进来,100分立刻给。
- 请问如何检测进程中是否存在某一程序
- 怎麽做字段不固定的报表????
- 重金200,加人民币也行,求购 XLSReadWrite V1.34 组件的注册版!因为用OLE方式处理Excel表格太慢了,老外的注册费要30美金,并非不想花钱,实在是无法支付!怎奈老外不收人民币!哪位大哥帮忙找找!如果有的话!我愿出价购买!
- 大伙Application的Icon都哪来的
- 怎么关闭SVN?
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
ListBox1: TListBox;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
ListBox1.Items.Add(Edit1.text);Edit1.Text:= '';
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ListBox1.Items.Add(Edit1.text);Edit1.Text:= '';
end;
end.
麻烦大家帮我看下,我还有一个问题没有解决:
http://topic.csdn.net/u/20101222/17/93416e37-70eb-4912-9eb6-ade54ac7b2d6.html?91497
在本页面点击结贴。
http://topic.csdn.net/u/20101222/17/93416e37-70eb-4912-9eb6-ade54ac7b2d6.html?91497
你这个问题二楼大牛已经完美回答你了if OpenDialog1.Execute then Memo1.Lines.Add(OpenDialog1.FileName);