-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path856.py
More file actions
29 lines (22 loc) · 657 Bytes
/
856.py
File metadata and controls
29 lines (22 loc) · 657 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#Import the required Libraries
from tkinter import *
from tkinter import ttk
#Create an instance of Tkinter frame
win= Tk()
#Set the geometry of Tkinter frame
win.geometry("750x250")
def display_text():
global entry
string1= entry.get()
string=string1+"hello"
label.configure(text=string)
#Initialize a Label to display the User Input
label=Label(win, text="", font=("Courier 22 bold"))
label.pack()
#Create an Entry widget to accept User Input
entry= Entry(win, width= 40)
entry.focus_set()
entry.pack()
#Create a Button to validate Entry Widget
ttk.Button(win, text= "Okay",width= 20, command= display_text).pack(pady=20)
win.mainloop()