Making a second window with Tkinter

greenflame alikakakhel at yahoo.com
Fri Jun 2 17:03:04 EDT 2006


I have a script that will make a window that shows the text I want
using Tkinter. What I need to do is to make another window popup above
the current window showing other text. I tryed:

-----------
from Tkinter imprt *

root = Tk()

L = Label(root, text="Blah")
L.grid(row=0, column=0)

# Other labels are also here but their inclusion is not so relavent.

root.mainloop()

sub = Tk()

subL = Label(root, text="Blah")
subL.grid(row=0, column=0)

sub.mainloop()
----------
However, when I ran the script it only showed the second window after I
closed the first one. After looking at the code I guess I can see why.
The problem is that I do not know how to fix the issue. Thank you for
you help.




More information about the Python-list mailing list