above
解决方案 »
- 历史遗留问题,listview头部重画问题.已经基本实现,需要优化,谢绝灌水.高手进.
- 为何连接后 ADOTable1 前面打了个问号?
- 关于DELPHI中EXE的调用?
- 使用数据集table组件编写简单的桌面数据数,数据库使用dbf,库没有索引现在要在dbgrid中排序
- TChart怎么这么难用啊?!
- 请问怎么可以知道一个程序是不是我要找的程序!
- F1BOOK的发布问题
- 正在找一个叫做dbexportD5或dbexportD6的控件,不知哪位大哥能提供一点线索?
- 请教:如何阻止一个应用/窗口 Deactivate
- 特别容易的难题!
- 如何用程序实现修改EXE文件图标,和运行后缀不为".exe"的EXE文件?
- <<DELPHI 5开发人员指南>>的源代码哪里有
ComboBox.OnChange:=nil;我这没有Delphi不能写全了
Shift: TShiftState);
begin
sendmessage(cmb.Handle,CB_SHOWDROPDOWN,1,0);
end;
unit ERpComboBox1;interfaceuses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls;type
TERpComboBox1 = class(TComboBox)
private
{ Private declarations }
FOnchange:TNotifyEvent;
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
property OnChange:TNotifyEvent read FOnchange write FOnchange;
end;procedure Register;implementationprocedure Register;
begin
RegisterComponents('Samples', [TERpComboBox1]);
end;end.不过照我这样写的组件,以后就再也不会触发OnChange事件了,如果谁有更好的办法,就上来聊聊
ComboBox1.OnChange := nil;
ComboBox1.Text := 'aa';
ComboBox1.OnChange := nil;
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
ComboBox1: TComboBox;
procedure FormCreate(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin ComboBox1.OnChange:=nil;
end;procedure TForm1.ComboBox1Change(Sender: TObject);
begin
Showmessage('没有实现!');
end;end.