import tkinter as tk
def add_text():
textbox.insert(0, "Welcome user!")
# 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)
# Create a button
button = tk.Button(root, text="Click to add textbox text", command=add_text)
button.pack(pady=5)
# Run the application
root.mainloop()