value:=TListBox.Create(Self);
value.parent:=self;
value.OnMouseDown:=(procedure name)
value.parent:=self;
value.OnMouseDown:=(procedure name)
解决方案 »
- Delphi 调用SQLite 的OBJ
- 关于(ldsmtp)的发送邮件问题
- Delphi 中设置的快捷键 为什么无效啊 ????————————在线等待!!!!
- 高分请教: 自动更新数据库表问题
- 如何让delphi的注释变成其他颜色,非蓝色?
- 高手请进!!!!
- 哪位大虾有研究过Report Machine报表程序,希望能过与小弟交流交流。
- 急!!!!那位大哥帮帮忙,inet控件post数据问题
- 我怎样用Delphi编译Exe文件才能单独运行?
- 如何保存用hook函数截获的键码?
- WIN CE和WINDOWS有什么区别?用DELPHI写的程序能在WIN CE运行吗?
- 怎样求出ListBox中某项的Index(该项的名称知道)
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure MyDefineListBox1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}function Sum(x,y:byte):word;
begin
result:=x+y;
end;procedure TForm1.Button1Click(Sender: TObject);
var
x:TListBox;
begin
x:=TListBox.Create(self) ;
x.Parent:=Form1;
x.Items.Add('OK?');
x.OnClick:=MyDefineListBox1Click;
end;procedure TForm1.MyDefineListBox1Click(Sender: TObject);
begin
ShowMessage('OK!');
end;end.