[Pythonmac-SIG] Tkinter questions

Peter Sommerfeld peter.sommerfeld@gmx.de
Thu, 22 Apr 1999 02:47:26 +0200


A wild guess (don't have TK installed)

That looks like similar problems I had when running
another event loop under the IDE, How about storing
and restoring the menubar ?

# store
oldBar = Menu.GetMenuBar()

# run TK

# restore
Menu.ClearMenuBar()
Menu.SetMenuBar(oldBar)
Menu.DrawMenuBar()

-- Peter

Steven D. Majewski wrote:
>It looks like this behaviour may be due to the changes in Tk 8.0.x to
>support Mac style menu's. I don't think the earlier versions behaved
>like this.
>
>It looks like when you create a Tk root:
>	root = Tkinter.Tk()
>
>that Python's menu bar get's overwritten with Tk's menu default menu bar.
>If you look at the apple menu, just before that call, you have 'About
>Python', and right after, you have 'About Tcl & Tk' .
>
>The Tk menus, however, won't do anything until you run the mainloop:
>	root.mainloop()
>
>Then, when you QUIT from the Tk menubar, the Python menubar reappears.
>However, the Python interpreter has terminated, so you can't type in
>the listener window, but you can QUIT the Python app, or select 'About
>Python' from the apple menu.