How to get TSpeedButton. Double-click event?

TspeedButton A double-click event does not fire when I double-click it. I need different functions for the OnClick event and OnDblClick event.

Thanks, Rakesh.

+4
source share
1 answer

The short answer is that the Delphi double-click event is not used if the GroupIndex property is non-zero - in the code below, this means that FDown may be true. If GroupIndex = 0, then FDown will not be true. The source for this event is as follows:

procedure TSpeedButton.WMLButtonDblClk(var Message: TWMLButtonDblClk); begin inherited; if FDown then DblClick; end; 

If you want to play, you can remove "if FDown" from this, recompile vcl, and it will probably work fine for you.

-Don

+5
source

Source: https://habr.com/ru/post/1380512/


All Articles