Python - Tkinter Text Introduction

aimtocode

Tkinter Tkinter Text

The Text widget provides formatted text display. It allows you to display and edit text with various styles and attributes. The widget also supports embedded images and windows.

A text widget manages a multi-line text area. Like the canvas widget, Tk's text widget is an immensely flexible and powerful tool which can be used for a wide variety of tasks.

The text widget is used to display text documents, containing either plain text or formatted text (using different fonts, embedded images, and other embellishments). The text widget can also be used as a text editor.


Example 1:



Output:


Example 2:



Output:


Example 3:



Output:

aimtocode