[Tutor] Clear the text in an entry widget

David Holland davholla2002 at yahoo.co.uk
Sun Mar 13 19:29:48 CET 2005


Thanks John,

That works, the problem was that I had written 
self.answer_ent.grid.delete(0.0, END)

However when I replaced the 0.0 with a 0, it worked
fine.
At least I found a work around but your idea is much
more elegant.

David
--- John Fouhy <jfouhy at paradise.net.nz> wrote:
> David Holland wrote:
> > I have written a simple test your maths program.
> > There is just one question, how do you clear the
> text
> > in a tkinter widget ?
> 
> If you have an entry widget e, then e.delete(0, END)
> will clear it.
> 
> Have a look at the docs here: 
>
http://www.pythonware.com/library/tkinter/introduction/
> 
> They aren't complete, but they are the best I have
> found...
> 
> -- 
> John.
> 

Send instant messages to your online friends http://uk.messenger.yahoo.com 


More information about the Tutor mailing list