[Tkinter-discuss] Python 3.4.0 alpha 2 available
Russell E. Owen
rowen at uw.edu
Tue Sep 24 23:09:36 CEST 2013
In article <5240F7E1.3000508 at codebykevin.com>,
Kevin Walzer <kw at codebykevin.com> wrote:
> On 9/23/13 3:49 PM, Russell E. Owen wrote:
> > I have not yet tried to come up with a minimal bit of code that shows
> > the problem, but it sounds as if perhaps I should.
>
> That would be helpful. It's hard to tell what's going on with just the
> crashlog.
>
> --Kevin
Here you go. The appended code crashes when I push the button.
If I don't mess with the menu bar then it does not crash.
-- Russell
#!/usr/bin/env python
import Tkinter
import tkFont
root = Tkinter.Tk()
parentMenu = Tkinter.Menu(root)
mnu = Tkinter.Menu(parentMenu, name="apple", tearoff=0)
parentMenu.add_cascade(label = "TUI", menu = mnu)
labelWdg = Tkinter.Label(root)
font = tkFont.Font()
labelWdg.option_add("*Button.font", font)
def changeFont():
font.configure(size=14)
btn = Tkinter.Button(root, text="Change Font", command=changeFont)
btn.pack()
root["menu"] = parentMenu
root.mainloop()
More information about the Tkinter-discuss
mailing list