Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
How to use Unicode and Special Characters in Tkinter?
Sometimes we need to add unicode and special charset in our Tkinter application. We can add unicode characters in our labels or widgets concatenating the signature as, u ‘/
In this example, we will add a unicode character in the button widget.
Example
# Import the required Libraries
from tkinter import *
#Create an instance of tkinter frame
win= Tk()
win.geometry("700x200")
#Create a button
Button(win, text='Click'+u'\u01CF', font=('Poppins bold',
10)).pack(pady=20)
#Keep running the window or frame
win.mainloop()
Output
Running the above code will create a button with a unicode character (u01CF).

Advertisements
