[Tkinter-discuss] Problem facing in lift and tkraise urgent
YMohan
yogendra_mohan at oxyent-medical.com
Sat Mar 21 16:35:44 CET 2009
Hi All,
I am facing the issues while using the lift or tkraise with create_window
objects. its not working. I am trying to do the show one window at a time. I
have created two window objects using the create_window and try to launch
the first one. The following code I have written
from Tkinter import *
root = Tk()
canvas = Canvas(root, width=300, height=300, bg='white') # 0,0 is top left
corner
canvas.pack(expand=YES, fill=BOTH) # increases down, right
def setAbove():
canvas.tkraise(objectID1)
# print "after tk raise"
widget1 = Frame(canvas, bg='red', height=100, width=100)
widget2 = Frame(canvas, bg='blue', height=100, width=100)
objectID1=canvas.create_window(100, 100, window=widget1) # embed a
widget
objectID2=canvas.create_window(100, 100, window=widget2) # embed a
widget
root.after(5000, setAbove)
root.mainloop()
Let me know what am I doing wrong or any other way to do the same?
Thanks in advance.
YMohan
--
View this message in context: http://www.nabble.com/Problem-facing-in-lift-and-tkraise-urgent-tp22637232p22637232.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
More information about the Tkinter-discuss
mailing list