I'm relatively new to Python and especially new to the tanker, in the following example code, Direct works fine , When made directly (left button), but if a dialog is made from a thread (dial button), then this application becomes unresponsive, what is the problem looking for? Can start thread dialogue? if so, how? View of Alex Martley. Tector import threading count from tanker imports = 0 DEF MacDiald (): Global counting count = count + 1; Messagebox.showinfo ('click counter', 'click # {0}'. Format (count)) def makeThread (): threading. Thread (target = MacDialog). Start () root = tc () root.title ("Dialogs") mainframe = ttk.frame (root) mainframe.grid (column = 0, line = 0) mainframe.columnconfigure (0, weight = 1) mainframe.oof configure (0, weight = 1) button 1 = ttk.Button (Mainframe, Text = "Dialog", command = makeDialog) Button 1. Grid (line = 1, column = 1) button2 = T.Tech.button (mainframe, text = "thread dialog", command = macheed) button 2.gid (line = 1, column = 2) root.mainloop ()
Comments
Post a Comment