Lazo Lab Sign up

App 5: Desktop App with Windows & Buttons / Build a notes app

Lesson 7 of 10

A text editor window

A Text widget is a big multi-line box. With a menu bar and a few functions you have a notes app.

Key points

  • tk.Text for multi-line text
  • tk.Menu for File menus
  • text.get("1.0", tk.END) reads it all
root = tk.Tk()
root.title("Lazo Notes")
text = tk.Text(root, wrap="word", font=("Arial", 13), undo=True)
text.pack(fill="both", expand=True)

Your turn

Create the notes window and type into it.

Watch a video on thisOpens YouTube search results for “A text editor window” in a new tab

Quiz · +10 XP

Which widget holds multiple lines of text?

Log in to save progress and earn XP.