| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 293 人关注过本帖
标题:delphi菜鸟请教
只看楼主 加入收藏
sevenhuashao
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-10-3
收藏
 问题点数:0 回复次数:0 
delphi菜鸟请教

这个程序的操作为:在form1窗体中分别添加listbox,memo,edit,button,然后双击button空间在弹出的代码编辑器中输入程序,最终在memo控件中显示用户在listbox中选定的项目。但是总是有错误,请高手指点一下。

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Edit1: TEdit;
ListBox1: TListBox;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Lines.Add(Edit1.Text);
If ListBox1.ItemIndex>=0
Then Memo1.Lines.Add(ListBox1.Items[ListBox1.ItemIndex])

end;

end.

搜索更多相关主题的帖子: Windows procedure interface 
2007-10-03 19:46
快速回复:delphi菜鸟请教
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013831 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved