The index Parameter

A number of widgets require``index'' parameters to be passed. These are used to point at a specific place in a Text widget, or to particular characters in an Entry widget, or to particular menu items in a Menu widget.

Entry widget indexes (index, view index, etc.)
Entry widgets have options that refer to character positions in the text being displayed. You can use these Tkinter functions to access these special points in text widgets:

refers to the last position in the text

refers to the point where the text cursor is

indicates the beginning point of the selected text

denotes the last point of the selected text and finally

At(x[, y])
refers to the character at pixel location x, y (with y not used in the case of a text entry widget, which contains a single line of text).

Text widget indexes
The index notation for Text widgets is very rich and is best described in the Tk man pages.

Menu indexes (menu.invoke(), menu.entryconfig(), etc.)

Some options and methods for menus manipulate specific menu entries. Anytime a menu index is needed for an option or a parameter, you may pass in:

See About this document... for information on suggesting changes.