Python 3 Tkinter Read Only Text Widget GUI Desktop App Full Project For Beginners



pip install tkreadonly





from tkinter import *

from tkreadonly import ReadOnlyText

# Create the main Tk window
root = Tk()

# Create a main frame
main_frame = Frame(root)
main_frame.grid(column=0, row=0, sticky=(N, S, E, W))

# Put a ReadOnlyText widget in the main frame
read_only = ReadOnlyText(main_frame)
read_only.grid(column=0, row=0, sticky=(N, S, E, W))

# Add text to the end of the widget.
read_only.insert(END, 'Hello world')

# Run the main loop

Leave a Reply