Create an Entry widget with the Entry method. An entry widget is a space for the user to enter text. The value that the user has typed into the widget is stored in the variable pointed to by the -textvariable option.
$parent->Entry (options)
The standard configuration options that apply to Entry are: -background, -bg, -borderwidth, -bd, -cursor, -exportselection, -font, -foreground, -fg, -high-lightbackground, -highlightcolor, -highlightthickness, -insertbackground, -in-sertborderwidth, -insertofftime, -insertontime, -insertwidth, -justify, -relief, -selectbackground, -selectborderwidth, -selectforeground, -state, -takefocus, and -xscrollcommand.
Other options are:
In an Entry widget, several indexes are defined to identify positions in the entry text. These are used by the methods that retrieve and manipulate entry text.
In addition to configure and cget, the following methods are supported for the Entry widget:
$entry->delete('sel.first', 'sel.last');
$input = $entry->get;
$entry->icursor('end');
$length = $entry->index('end');
$entry -> insert('end', '.txt');
$entry->selection('adjust', 'end');
$entry->selection('clear');
$entry->selection('from',0);
if ($entry->selection('present')) { $entry->delete('sel.first','sel.last'); }
$entry->selection('range',0,'end');
$entry->selection('to','insert');
$entry->xview(0);
$entry->xview('moveto',0.1);
$entry->xview('scroll',1,'units');
Copyright © 2002 O'Reilly & Associates. All rights reserved.