Forum > LCL
Is there build in way to distinguish between single mouse down and double clicks
jamie:
The proper way of doing this in reality is to structure the code in such a way that the first click will always execute but in a such a way that the Double event will either add to or remove the first click results event.
Normally double clicks are for additional options but whatever, I guess.
LV:
--- Quote from: jamie on November 24, 2024, 02:48:52 am ---This is my version, close to another above but I found a 100 ms not working very well.
--- End quote ---
If the end-user hasn't slept enough today, the 250ms delay for double-click may not work well. I prefer more reliable alternatives.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin if ssCtrl in Shift then ShowMessage('Left + Ctrl') // or execute code A else ShowMessage('Left'); // or execute code Bend;
Navigation
[0] Message Index
[*] Previous page