Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.

  How can I initialize an entry widget with some text?
 You can use the `-textvariable` option for an `entry` widget as follows:

set default "foobar"
entry .foo -width 25 -textvariable default

or you can specifically insert text into the entry (only works when the
entry widget is configured as `-state normal`):

entry .foo
.foo insert 0 "foobar"