The Entry widget support the standard Tkinter Widget
interface, plus the following methods:
- insert(index, text)
Insert text at the given index. Use insert(INSERT, text) to
insert text at the cursor, insert(END, text) to append text to the
- delete(index), delete(from, to)
Delete the character at index, or within the given range. Use
delete(0, END) to delete all text in the widget.
Move the insertion cursor to the given index. This also sets the
- get() => string
Get the current contents of the entry field.
- index(index) => index
Return the numerical position corresponding to the given
Adjust the selection to include also the given character. If
index is already selected, do nothing.
- selection_clear(), select_clear()
Clear the selection.
Starts a new selection. This also sets the ANCHOR
- selection_present() => flag, select_present()
Returns true (non-zero) if some part of the text is
- selection_range(start, end), select_range(start,
Explicitly set the selection. Start must be smaller than end.
Use selection_range(0, END) to select all text in the
- selection_to(index), select_to(index)
Select all text between ANCHOR and the given index.
These methods are used to scroll the entry widget in various
ways. The scan methods can be used to implement fast mouse
panning operations (they are bound to the middle mouse button, if
available), while the xview method is used with a standard
Set the scanning anchor for fast horizontal scrolling to the
given mouse coordinate.
Scroll the widget contents sideways according to the given mouse
coordinate. The text is moved 10 times the distance between the
scanning anchor and the new position.
Make sure the given index is visible. The widget is scrolled if
- xview_moveto(fraction), xview_scroll(number,