woooee
unread,Jan 22, 2012, 2:30:01 AM1/22/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tk Documentation and Resources
The grid() manager returns None so the variable "button" contains
None, and "why is it None" pops up on forums from time to time (so
please don't teach bad habits)
from tkinter import *
from tkinter import ttk
root = Tk()
button = ttk.Button(root, text="Hello World").grid()
root.mainloop()
it should either be just
tk.Button(root, text="Hello World").grid()
with an explanation that we aren't accessing the button further, or
button=tk.Button(root, text="Hello World")
button.grid()