Next / Previous / Contents

24.5. Text widget tags

There are lots of ways to change both the appearance and functionality of the items in a text widget. For text, you can change the font, size, and color. Also, you can make text, widgets, or embedded images respond to keyboard or mouse actions.

To control these appearance and functional features, you associate each feature with a tag. You can then associate a tag with any number of pieces of text in the widget.

Tags are created by using the .tag_add() method on the text widget. See Section 24.8, “Methods on Text widgets”, below, for information on this and related methods.