By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,551 Members | 2,727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,551 IT Pros & Developers. It's quick & easy.

Double Click mouse event problems

P: n/a
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.

Jan 7 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
scott_gui wrote:
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
sc***********@acm.org
Jan 7 '06 #2

P: n/a
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.

Jan 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.