1. LeftDoubleClick and LeftClick
- Posted by Judith <camping at txcyber.com> Apr 08, 2001
- 435 views
I've put in Derek's code to allow checking for leftDoubleClick in my on mouse routine for IDE. I'm running into a problem that I wonder if anyone knows a get-around for. If the user has multiple control drop selected and leftdoubleclicks, the last control selected is droped onto the Design Form and THEN the leftdoubleclick routine takes action. What is happening is that the leftclick routine takes action before Win32lib detects the second click. I've changed my mouse click speed to no avail. If the user has multiple control drop unselected, there is no problem, so the situation is an isolated one. I can warn the user in the IDE docs but would rather find a programatical solution. I'm checking in onMouse routine for leftdoubleclick before leftclick. I don't want to change anything in Win32lib itself since all users of IDE would have to do the same thing and I'm sure those who rely on the stamped versions would not like doing that. Ideas? Judith
2. Re: LeftDoubleClick and LeftClick
- Posted by Derek Parnell <ddparnell at bigpond.com> Apr 08, 2001
- 439 views
Judith wrote: > If the user has multiple control drop selected and leftdoubleclicks, the > last control selected is droped onto the Design Form and THEN the > leftdoubleclick routine takes action. What is happening is that the > leftclick routine takes action before Win32lib detects the second click. > I've changed my mouse click speed to no avail. If the user has multiple > control drop unselected, there is no problem, so the situation is an > isolated one. I can warn the user in the IDE docs but would rather find > a programatical solution. Hi Judith, the left click will always fire before a double-click. It has to, if you think about it. The button-down/button-up combination is a click. To have a double click you must have a single click first. To get over the problem, either change the IDE so that a single click can always be allowed before a double click. However if that is not possible, you might have to delay the single click behaviour. You have to detect the single click, then wait for the double-click period and if a double click is not detected execute the single click behaviour. Rather messy and the user might wonder why a delay occurs when they single click. I think that convention in Windows is that a single click SELECTS and a double click ACTS. If instead, an application uses single click to ACT, then a double click is ignored. Try double clicking on a normal button - only the first click is used, the second is ignored. In a text editor or word processor the first click will select the window (give focus to it) and the second click (in a double) will act on what ever is under the cursor. ------ Derek Parnell Melbourne, Australia "To finish a job quickly, go slower."