Python Tk Text
- Text
import tkinter as tk
app = tk.Tk()
app.title('Text Editor')
text = tk.Text(app)
text.pack({"side": "bottom"})
app.mainloop()
-
text.delete(1.0, tk.END)
-
text.insert('end', content)
-
content = text.get(1.0, tk.END)
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
import tkinter as tk
app = tk.Tk()
app.title('Text Editor')
text = tk.Text(app)
text.pack({"side": "bottom"})
app.mainloop()
text.delete(1.0, tk.END)
text.insert('end', content)
content = text.get(1.0, tk.END)