Updating A Tkinter Window every 100 ms?
Josiah
josiah7 at hotmail.com
Tue Nov 19 19:29:20 EST 2002
I would like to create the TK dialog with a "Update" function that
will run every 100 ms. A self calling function. Inside this fuction, I
want to call "lift()" to keep the window on top of all the others, and
I want to call another function that will update other things.
Could some look at my sample code and please give me some feedback?
Is there a better way? Why does the "lift()" function not work with
"self.master.lift()"?
Thanks for any help with this.
Josiah
##############################################################
from Tkinter import *
class App:
def __init__(self, master):
frame = Frame(master)
frame.grid()
def Do_Stuff(self):
pass
def Update(self):
self.Do_Stuff()
root.lift()
root.after(100, self.Update)
root = Tk()
app = App(root)
app.Update()
root.mainloop()
###############################################################
More information about the Python-list
mailing list