TButton类型不能响应鼠标双击事件,即使用了显式声明,如:
TxyButton = class(TButton)
published
property OnDBlClick;
end;
查了一下源代码:
procedure TControl.WMLButtonDblClk(var Message: TWMLButtonDblClk);
begin
SendCancelMode(Self);
inherited;
if csCaptureMouse in ControlStyle then MouseCapture := True;
if csClickEvents in ControlStyle then DblClick; //注意这里的csClickEvents
DoMouseDown(Message, m...[ 查看全文 ]