[Appendix A] A.3 Entry
Author: Sriram Srinivasan
Date: 1999-07-02T01:43:07Z

#

| Appendix A Tk Widget Reference |

## A.3 Entry

Entry widgets are simple one-line text widgets. They do not support tags, marks, or embedded windows. The indexing syntax is consequently simpler:

number

  Index into its contents, starting from 0.

`end`

  End of the text.

`insert`

  The position immediately after the insertion cursor.

`sel``.``first`, `sel.last`

  Indicates the first and last character of a tag.

The `index` argument for all methods in Table A.7 accepts any of the styles described above.

Table A.7: Entry Widget Properties and Methods
Properties | Description
--- | ---
show | If false, it displays "*", not the real contents, and is used for obtaining passwords. Note that if the text is selected and pasted elsewhere, the real contents show up.
Methods |
get (index) | Gets the entire string.
insert (index, string) | Inserts a string at the index.
index (index) | Returns the numerical index.
selectionFrom (index) selectionTo (index) selection (from,to) selectionClear | To set or adjust the selection.
selectionPresent | True if there's a selection.

A.2 Canvas |  | A.4 Listbox