473,287 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Double Click Mouse Event in Tkinter

Creating a Windows application:
<Double-Button-1> mouse event has a conflict when there is also a
binding to the <Button-1> event. It seems like a silly oversight that
performing a double click will also initiate the single click action.

Has anyone figured out a way to circumvent this problem? Right now I am
making the Double click function undo the action my Single click
function does, but this is very annoying, especially since the action
that is bound to the Single click flashes for a second.

Jan 7 '06 #1
1 5224
"scott_gui" wrote:
Creating a Windows application:
<Double-Button-1> mouse event has a conflict when there is also a
binding to the <Button-1> event. It seems like a silly oversight that
performing a double click will also initiate the single click action.
If your design depends on your code being able to accurately figure out what
the user will do in the future, you may want to go back to the drawing board.
Has anyone figured out a way to circumvent this problem? Right now I am
making the Double click function undo the action my Single click
function does, but this is very annoying, especially since the action
that is bound to the Single click flashes for a second.


I don't think I've ever seen any recent application that does this (be-
cause all possible "solutions" are annoying), but I seem to recall that
the Explorer in some early version of Windows overloaded single and
double click actions by delaying the single click action (click and wait =
single click action, click and click = double click action).

To implement this in Tkinter, you can schedule an "after" task in the
Button-1 handler, and cancel it in the Double-Button-1 handler. But
a redesign is probably a better idea...

</F>

Jan 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: eltronic | last post by:
here is some code to add right click context menus. in the few apps I've edited sofar, it just works, once you run rCbinder with the root of the gui or bind B3 all present and future widgets will...
1
by: Sakharam Phapale | last post by:
Hi All, How to capture Mouse Single click and mouse double click event on Commnad Button. I am doing as follows. Private void Button1_MouseUp(Object sender,...
5
by: Nick | last post by:
Hey guys, I have 2 events on a windows forms datagrid, the mouse move as well as the double click events. What's happening is that when I double click on a row in the grid, the mouse move event...
2
by: scott_gui | last post by:
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...
1
by: Tuvas | last post by:
I am trying to execute a function with a tkinter event binding double click. With 2 mouse clicks done quickly, the function should happen, otherwise, it should not. However, I am noticing that the...
9
by: Armando | last post by:
I have an app (A2000) where I am letting the user move an object on the screen. I use the OnClick for a command button event to modify the object's Top (or Left) properties, but you can only click...
2
by: techsatish | last post by:
Hi, I want the double click event to call(here not able to get the MouseEventArgs) and execute the mouseup event code or any one tell me how to make my treecontrol double click nodes to behave...
3
by: Techsatish | last post by:
how to make a mouseup event called only once during a double click event? here double click is made on a tree node in a tree control. I have the code inside mouseup event....in runtime the...
0
by: Paul DeWitt | last post by:
I have a textbox on a Windows Form. I am wanting to display a popup form to request/validate info if the user clicks the textbox and have a different form (to delete data) load if the user either...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.