Coding Tutorials Hub

Learn coding with simple code, clear explanations, and examples

Python TKinter GUI - Entry Widget [textbox]

📄 Code


import tkinter as tk

# Create the main window
root = tk.Tk()
root.title("Tkinter-GUI textbox Tutorial")
root.geometry("300x100")

# Create a single-line input textbox
textbox = tk.Entry(root)
textbox.pack(pady=10)

# Run the application
root.mainloop()
        
💡 Output