I have been learning tkinter through Message widget in Tkinter at Python Courses and Tutorials.
I keep getting an error when I add the anchor option with the options presented on the site. I am being told that NE
does not exist but NE
is given as an anchor option in the link above:
NameError: name 'NE' is not defined
Here's my code.
import tkinter
root = tkinter.Tk()
message = ("Whatever you do will be insignificant,"
"but it is very important that you do it.\n"
"(Mahatma Gandhi)")
msg = tkinter.Message(root,text = message, anchor = NE, aspect = 1000,
foreground='red', background='yellow',
highlightcolor='green', highlightthickness=0,
borderwidth=500)
#msg.config(bg='lightgreen', font=('times', 24, 'italic'))
msg.pack()
tkinter.mainloop()
Edit: I also tried typing in 'NE'
in single quotes and it didn't work.