Index

Indexing helps you target a particular place within a piece of text. For example, if you want to mark a particular word in bold, red, or in a different font size, you can do so if you know the index of the starting point and the index of the endpoint that needs to be targeted.

The index must be specified in one of the following formats:

The index format Description
x.y This refers to the character at row x and column y.
@x,y This refers to the character that covers the x,y coordinate within the text's window.
end This refers to the end of the text.
mark This refers to the character after a named mark.
tag.first This refers to the first character in the text that has been tagged with a given tag.
tag.last This refers to ...

Get Tkinter GUI Application Development Blueprints - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.