[docs] how to prevent repeat click on tkinter button

wu snowflake01986 at 126.com
Wed Jan 17 04:15:04 EST 2018


Dear tkinter developper,

I try to learn tkinter recently, I have a problem about the button 
wedge, an example code is as follows:

/import tkinter as tk
import time
master = tk.Tk()
master.geometry("200x200")

def sleeptime():
     print("dfdhdhdhh")
     time.sleep(4)

tk.Button(master, text = 'start working', repeatinterval = 3, 
command=sleeptime).pack()
master.mainloop()/

/
/

try to click on the button quickly for several times and you will find 
that the button still works when in gray. Is there any way to get it 
over? (Python 3.5.2+)

I appreciate your reply. Thank you very much.

Sincerely,

Huan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20180117/d2551e23/attachment.html>


More information about the docs mailing list