From here , it seems that the workaround using Entry in Tkinter is doable. Here is the code:
import Tkinter as Tk root = Tk.Tk() ent = Tk.Entry(root, state='readonly') var = Tk.StringVar() var.set('Some text') ent.config(textvariable=var, relief='flat') ent.pack() root.mainloop()
EDIT: To answer your comment, I found a way to insert multi-line text using the Text widget. Here is the draft decision:
from Tkinter import * root = Tk() T = Text(root, height=2, width=30, bg='lightgrey', relief='flat') T.insert(END, "Just a text Widget\nin two lines\n") T.config(state=DISABLED)
I'm (still) interested in any better solution :)
source share