Showing posts with label Tkinter textbox. Show all posts
Showing posts with label Tkinter textbox. Show all posts

Tuesday, August 4, 2020

Write a Program Get input using Entry class (Tkinter textbox) in Python.

Tkinter textbox in Python.


from tkinter import *

window = Tk()

window.title("Welcome to Coding Block")

window.geometry('350x200')

lable = Label(window, text="Hello World")

lable.grid(column=0, row=0)

text = Entry(window,width=10)

text.grid(column=1, row=0)

def clicked():

lable.configure(text="Welcome to My Blog")

button = Button(window, text="Clicked", command=clicked)

button.grid(column=2, row=0)

window.mainloop()

OUTPUT


Tkinter textbox

Tkinter textbox