24. The Text Widget
This chapter describes Tk’s text widget, which displays one or more lines of text. The text widget can also display embedded images and widgets. The text widget can be used to display text, provides the ability to edit text, and even presents an interface for interacting with HTML or other tagged text.
24.1 Text Widget Basics
You create a text widget with the
text widgetName ?option value ...?
The text widget supports many common widget options, such as
-font, which determine the default settings of the text displayed; additional options specific to the text widget, such as
-wrap, provide default tab stops and line-wrapping settings. As you will see in Section 24.4, all ...