[Tkinter-discuss] Toplevel - failure to understand it
Cameron Laird
Cameron at phaseit.net
Mon Jul 7 13:36:17 CEST 2008
On Mon, Jul 07, 2008 at 01:19:17AM -0700, gegard wrote:
.
.
.
> I have a Tkinter app that works for me until I use Toplevel to add a title.
> My efforts to use Toplevel have confused me, bringing an additional
> unwelcome blank window that I don't understand how to manage.
>
> The question is simply "how do I confer Toplevel methods to a top level
> PanedWindow and still have the application run in a single window?"
>
> Thank you for any direct help or pointers to code that works that I could
> understand.
.
.
.
There are several confusions in what you've written. If
I understand correctly, an example of what you'd like is
to decorate a PanedWindow with a title. I suspect that
the following will interest you:
import Tkinter
m = Tkinter.PanedWindow(orient = Tkinter.VERTICAL)
m.pack(fill = Tkinter.BOTH, expand = 1)
top = Tkinter.Label(m, text = "Do you see how wide the top pane is?")
m.add(top)
bottom = Tkinter.Label(m, text = "bottom pane")
m.add(bottom)
m.winfo_toplevel().title("look at me")
Tkinter.mainloop()
More information about the Tkinter-discuss
mailing list