X
xiaomin9007
Unregistered / Unconfirmed
GUEST, unregistred user!
我要为一第三方组件添加一双击事件,我是这样做的,下面是我在该组件的*.pas中添加的
代码:
type
TFlatListBox = Class(TCustomControl)
private
FOnDBClick :TNotifyEvent;
procedure WMMouseDBClick(var msg:TMessage);message LBUTTONBLCLK;//双击消息
published
property OnDBClick :TNotifyEvent read FOnDBClick write FOnDBClick;
procedure TFlatListBox.WMMouseDBClick(var msg:TMessage);
begin
if assigned(FOnDBClick) then
FOnDBClick(self);
end;
安装后多了一OnDBClick事件,但双击该组件,Form1.OnDBClick中的代码不执行,没反应,
就和没双击一样,请问是怎么回事啊?是不是代码有问题?
代码:
type
TFlatListBox = Class(TCustomControl)
private
FOnDBClick :TNotifyEvent;
procedure WMMouseDBClick(var msg:TMessage);message LBUTTONBLCLK;//双击消息
published
property OnDBClick :TNotifyEvent read FOnDBClick write FOnDBClick;
procedure TFlatListBox.WMMouseDBClick(var msg:TMessage);
begin
if assigned(FOnDBClick) then
FOnDBClick(self);
end;
安装后多了一OnDBClick事件,但双击该组件,Form1.OnDBClick中的代码不执行,没反应,
就和没双击一样,请问是怎么回事啊?是不是代码有问题?