Missing Double click event

2 views
Skip to first unread message

Jostein Bų

unread,
Aug 14, 2000, 3:00:00 AM8/14/00
to
The problems around double click events have been discussed in
different threads earlier, but I couln't find any answers to the
problem I experience. It is examplified by this little script:

button .btn -text "Press Me"
bind .btn <Double-1> {puts stdout Double}
bind .btn <ButtonPress-1> {puts stdout ButtonPress}
bind .btn <ButtonRelease-1> {puts stdout ButtonRelease}
pack .btn

I now expect a double click to generate the following response on
stdout:

ButtonPress
ButtonRelease
Double
ButtonRelease

This is actually what I get if I manage to keep the mouse in a fixed
position. But if I move the mouse 1 pixel or more between the clicks, I
get the following:

ButtonPress
ButtonRelease
ButtonPress
ButtonRelease

As we see, I don't get a double click event if I move the mouse between
the clicks. Is this how it is supposed to work? It is in fact very hard
not to move the mouse a single pixel during a double click. Can this be
configured in any way? I have tried it with the same result on both
UNIX and Windows environments.

Regards,
Jostein Bų.


Sent via Deja.com http://www.deja.com/
Before you buy.

Mac Cody

unread,
Aug 15, 2000, 3:00:00 AM8/15/00
to
Sounds like the problem might actually be in the setting for
the mouse's double-click repeat rate. Maybe the value needs
to be increased so that double-clicks are recognized more
easily. Hope this helps.

--
_________________________________________________________________
| | |
| Mac A. Cody | Principal Physics Engineer |
| Raytheon Systems Co., C3I | email: Mac_A...@raytheon.com |
| mail stop HA-36110 | phone: (972) 205-6452 |
| P.O. Box 660023 | or 1-800-752-6163 x6452 |
| Dallas, TX 75266 | fax : (972) 205-7180 |
|_______________________________|_________________________________|

Jostein Bų

unread,
Aug 17, 2000, 3:00:00 AM8/17/00
to
Thanks for the reply. However, my problem has nothing to do with the
repeat rate. It is triggered by the fact that both single and double
click events are bound to the same widget. It seems like a movement of
1 pixel or more between the two clicks of the double click disables the
double click in this situation (just try my sample script in a wish
shell).

Regards,
Jostein Bų.

In article <3999622B...@raytheon.com>,

Reply all
Reply to author
Forward
0 new messages