![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to set the font size of Entry widget in Tkinter?
The Entry widget in tkinter is a basic one-line character Entry box that accepts single line user input. To configure the properties of the Entry widget such as its font-size and width, we can define an inline widget constructor.
Example
Here is an example of how you can define the font-size of the Entry widget.
# Import the required libraries from tkinter import * from tkinter import ttk # Create an instance of tkinter frame or window win=Tk() # Set the size of the window win.geometry("700x350") # Create an Entry widget entry=Entry(win, width=35, font=('Georgia 20')) entry.pack() win.mainloop()
Output
Run the above code to display a window with a customized Entry widget.
Advertisements