Skip to Content
Tkinter GUI Programming by Example
book

Tkinter GUI Programming by Example

by David Love
April 2018
Beginner content levelBeginner
340 pages
7h 54m
English
Packt Publishing
Content preview from Tkinter GUI Programming by Example

Tkinter's indexing system

Indexing is handled in a somewhat coordinate-based way. An index is represented by two numbers separated by a single full stop. For example: 4.5.

The first number (before the .) in this index can be thought of as the line number. This begins at 1.

The second number (after the .) is how many characters into the line we are. This begins at 0.

The first character within a Text widget will therefore be located at 1.0. This means line 1, 0 characters in.

To ensure we fully understand this concept, let's create a demo application which will show us where the cursor is located at all times.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

Bhaskar Chaudhary

Publisher Resources

ISBN: 9781788627481Supplemental Content