Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

How to get the value of an Entry widget in Tkinter?

#Import tkinter library
from tkinter import *
from tkinter import ttk
#Create an instance of tkinter frame or window
win= Tk()
#Set the geometry of tkinter frame
win.geometry("750x250")
def get_value():
   e_text=entry.get()
   Label(win, text=e_text, font= ('Century 15 bold')).pack(pady=20)
#Create an Entry Widget
entry= ttk.Entry(win,font=('Century 12'),width=40)
entry.pack(pady= 30)
#Create a button to display the text of entry widget
button= ttk.Button(win, text="Enter", command= get_value)
button.pack()
win.mainloop()
Comment

PREVIOUS NEXT
Code Example
Python :: virtual enviroment 
Python :: python check if nan 
Python :: isprime python 
Python :: how to print sum of two numbers in python 
Python :: cut part of video ffmpeg 
Python :: pip is not a batch command but python is installed 
Python :: how to remove stop words in python 
Python :: how to delete all item in treeview tkinter 
Python :: pygame caption 
Python :: pandas multiindex to single index 
Python :: python 2d array to dataframe 
Python :: python make file path os 
Python :: python space separated input 
Python :: python longest word in string 
Python :: sklearn logistic regression get probability 
Python :: pandas rename column by index 
Python :: join pandas dataframe by column 
Python :: keras tuner 
Python :: tkmessagebox not found 
Python :: normal distribution in python 
Python :: clahe opencv 
Python :: create alinked list inb pyhton 
Python :: images in django 
Python :: python remove element from list 
Python :: how to use inverse trigonometric functions in python 
Python :: pathlib path python 
Python :: python insert on a specific line from file 
Python :: get last element of a list python 
Python :: pyspark overwrite schema 
Python :: pandas export csv without index 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =