Re:Click and Double Click
Quote
"Esther Michaels" <e_...@my-deja.com> wrote in message news:e_r_m-
> Rant over. What are we to do if we want to respond to both types of
> events, in different ways? The usual GUI rules don't get in the way here;
> single click is select, double click is "do something", and it's nice to
> see the thing being selected first. But what if there are incompatible
> actions required for single and double click? Has anyone met and solved
> this problem?
I understand and sympathise, its much like I felt when I first encountered
the behavior. However, mull it over. I think eventually you will come to
realize that it is actually a good thing . . . well at least the only
reasonable way to do things, especially given some historical context.
Remember that this behavior would probably have been defined back in the
good (not) old Win 1.0 days. Machines (micros) back then were lucky to run
at more than 16MHz. Pre-emptive multi-tasking didn't exist on micros, etc.
etc. If memory serves, the double click period was also fairly long.
In every case where I have initially wanted to use a click and double click
for incompatible tasks I've come to realize that the design was poor. Having
to re-evaluate/re-design the desired interface has lead to a much better ui.
While I'm not willing to state a general case, I do believe that its
probable good ui design and adherence to Win standards (like them or not) is
incompatible with conflicting semantics between single and double clicks.
Finally, programs would be much more sluggish if they had to wait the full
double-click time before they could react to a click. People notice delays
as low as 200 ms. I believe that most systems have their double click time
set longer.
All that being said. If one has to do it, it can be done. Have the click
event start a timer with an interval a little longer than the double click
time on the system. Disable the timer in the double click event. Put the
click code in the timer's event.