10154 : OnMouseDown deciding double click

OnMouseDown has arguments for Shift(state).

Shift holds a lot of good info, it is implemented as a set: TShiftState = set of (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble);

ssShift=1
ssAlt=2
ssCtrl=4
ssLeft=8
ssRight=16
ssMiddle=32
ssDouble=64

So when (Shift bitand 64)==64 then you know it was a double click….

Leave a Reply