[Tutor] Display in a text field using tkinter

Alan Gauld alan.gauld at btinternet.com
Sat Apr 3 14:08:20 CEST 2010


"doyin adegoke" <doyennehoney at yahoo.com> wrote

> I made the changes and the error was still there
>
> "print self.favorite.get()" prints the name of the selected database on 
> the console

The problem is that you are still calling grid when you create the widget.
grid() returns None so all your self.xxx attributes are set to None.

You must call grid after you create the widget.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list