473,770 Members | 6,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tkinter Event Binding Double-click

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 time that the
event binding of a double-click is quite long, on the order of a second
or so. I am double-clicking twice in a second, and the function is
being executed 3 times, and not just 2. I want to know, is this
controlled by the OS, or by Tkinter? And if by tkinter, is there a way
to change it, and how so? Thanks!

Feb 21 '06 #1
1 2675
Tuvas wrote:
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 time that the
event binding of a double-click is quite long, on the order of a second
or so. I am double-clicking twice in a second, and the function is
being executed 3 times, and not just 2. I want to know, is this
controlled by the OS, or by Tkinter? And if by tkinter, is there a way
to change it, and how so? Thanks!


You might need to provide more info and some relevant code. I bind to
double click all of the time and it works fine.

James
Feb 21 '06 #2

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

Similar topics

3
2763
by: Rodrigo Benenson | last post by:
Hi, I have a weird need in tkinter. If I have a widget I can *set* a binding ..bind("<the event>", the_callback) I also can *append* a binding ..bind("<the event>", the_second_callback, "+")
1
2418
by: Phil Schmidt | last post by:
I have an Entry widget inside a Frame. The Frame contains other widgets as well. I have bound the <Key> event to the Frame, but I don't want the Frame to receive the event when the Entry widget has focus. So, I bound the <Key> event to the Entry widget (bound to method a_key()). This works, except that both the Entry and Frame widgets get the event. This also forces me to implement event handlers, which is fine for the Frame since...
6
6088
by: Elaine Jackson | last post by:
I've got a script where a button gets pushed over and over: to cut down on the carpal tunnel syndrome I'd like to have the button respond to presses of the Enter key as well as mouse clicks; can somebody clue me in regarding how this is done? Muchas gracias. Peace
8
8850
by: Harlin Seritt | last post by:
I have the following script. Two widgets call the same function. How can I tell inside of the called function which button called it?: def say_hello(): print 'hello!' print widget root = Tk() button1 = Button(root, text='Button 1', command=say_hello) button1.pack()
9
1974
by: Tuvas | last post by:
I am building a tkinter program. A part of this program is to read data from an incoming interface, and depending on the data, will display a bit of text on the tk dialog, it decodes this data, so to speak. If one command is sent, everything's just fine. When multiple are sent, the program will stop responding, and will only continue to respond after one types <ctrl>-c. The statement at fault is something like this. e1=StringVar() Label...
2
6751
by: vm | last post by:
please help! I can't find anything wrong (except the result ofc ;-) This: picfile = 'logo.gif'
2
1451
by: Avi Kak | last post by:
Does Tkinter provide a function that returns all the event descriptors for a given widget class? I am looking for something similar to what you get in Perl/Tk when you call bind() with a single explicit argument. For example, in Perl/Tk, $widget->bind( Tk::Button ) returns a list like <Key-Return>
0
1341
by: Diogo Bastos | last post by:
Hello, I'm fairly used to working with Python but it's the first time I'm trying to use Tkinter so I'm running into a problem. I'm using three python scripts with Tkinter GUIs and a fourth script that basically opens communication pipes with the three others. The idea is that the fourth script works as a communication intermediary between the others. The problem is that I can't make the Tkinter GUIs respond to stdin events because the...
4
2884
by: Davy | last post by:
Hi all, I have written a simple Tkinter program, that is draw a rectangle in a canvas, when I press Up key, the rectangle move up. But the program seems work not properly? My environment is Python2.5+PythonWin. ##---------------------- from Tkinter import * class MyApp:
7
8013
by: Some Bloke | last post by:
I am trying to bind a WPF dependency property to an aggregate of a collection. I've implemented a wrapper around a Dictionary that implements INotifyCollectionChanged to fire the event when items are added or removed. Debugging through it I notice that there is nothing listening to the event after I bind to it which I expected the SetBinding to do as I don't know what delegate to attach to the event. It's the binding that needs updating...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10225
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10001
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8880
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3969
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3573
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.