Double Click mouse event problems

S

scott_gui

I am creating a Windows application:
The mouse event <Double-Button-1> has a conflict when the <Button-1>
event also has a binding. Double clicks will first perform the single
click action. This seems a little silly.

Anyone know how to circumvent this? Right now I am having the function
that is bound to the double click event undo the action the single
click event performs. This is annoying and it flashes the single click
event for a split second before the double click takes over.
 
S

Scott David Daniels

scott_gui said:
I am creating a Windows application:
The mouse event <Double-Button-1> has a conflict when the <Button-1>
event also has a binding. Double clicks will first perform the single
click action. This seems a little silly.

Anyone know how to circumvent this? Right now I am having the function
that is bound to the double click event undo the action the single
click event performs. This is annoying and it flashes the single click
event for a split second before the double click takes over.

This behavior is a feature of the double-click interface. Normal GUI
design techniques provide double-click behavior that is not interfered
with by the corresponding single-click behaviors.

Step back and think about what is happening instead of focusing in
tightly on mouse commands as being completely distinct operations.
You wouldn't expect three distinct (and non-overlapping) behaviors
from Button-1-Down, Button-1-Up and Button-1-Click, would you?

If you must, provide a single-click that initiates a timer event, where
the corresponding double-click turns off (or disables) the timer, and
cause the single-click behavior when the timer triggers.

On the original mouse, the buttons were "ored" together from the first
down to all buttons-up. If the result was neither none-seen or all-
seen, the operation happened at the release. Since that mouse had a
5-key paddle board (where paddle keys were included with the three
mouse buttons in the above algorithm), you could specify 254
different values with a mouse and paddle-board.


--Scott David Daniels
(e-mail address removed)
 
S

scott_gui

Thank you very much. Adding in a timer delay is a good fake out. I
guess I always considered a double-click to be one distinct behavior
aside from the single click. I have rarely seen where a double-click
action engaged an object without single clicks to select the object.
For example, the Window's file manager allows you to Ctrl-click select
two files and double click to launch both files. So I don't expect
distinct behaviors from Button-1-Down and Button-1-Up, but I guess I do
expect them from a double and single click.

No matter, I'll try the delay. This should work reasonably well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top