A user customises his mouse so he can issue a double-click using the mouse wheel or a special Logitech button. He reports my software recognises only standard left-button double-clicks. Any suggestions as to what I'm failing to provide? How to fix?
software is Delphi Alexandria, VCL, Windows.
This descendant of TDrawgrid looks for double-clicks by setting OnDblClick to a custom procedure in Create:
OnDblClick := DoDoubleClick;
procedure DoDoubleClick(Sender: TObject);
procedure TWS_Grid.DoDoubleClick(Sender: TObject);
begin
if fGridState <> gsNormal then
exit;
if Assigned(On_DoubleClickCell) then
begin
On_DoubleClickCell(self, Col, Row);
just_double_clicked := true;
end;
end;
That On_DoubleClickcell works well with ordinary left button double-clicks. However, my own CheckMouseDown called by OnMouseDown does not accept any other buttons than mbLeft:
procedure TWS_Grid.CheckMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
var
ACol, AGridRow: integer;
begin
if (Button <> mbLeft) or (not(fGridState in [gsNormal, gsSelecting])) then
exit;
...
Do I need to somehow count clicks in OnMouseDown or OnMouseUp?
Thanks