[Tutor] How to set a default value for Tkinter.Entry ?

Sheila King sheila@thinkspot.net
Fri, 24 Aug 2001 10:00:24 -0700


On Sat, 25 Aug 2001 01:31:56 +0900, "HY" <pythonpython@hotmail.com>
wrote about [Tutor] How to set a default value for Tkinter.Entry ?:

:Is there a way to set a default value for Tkinter.Entry?
:I mean can you do somethig to Tkinter.Entry like setting the default text value for text field in HTML's form?
:
:Thanks a lot.
:
:HY

This is something my son and I were working on yesterday.

You probably want the insert method for the Entry widget.
Here is a handy Tkinter reference:
http://www.pythonware.com/library/tkinter/introduction/index.htm

Looking at the Entry methods:
http://www.pythonware.com/library/tkinter/introduction/x3960-methods.htm

It looks like, if

input = Entry(root)

is your Entry widget, then

input.insert(0, "My default text here")

should work???

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/