In this video I’ll show you how to use Emoji’s in your Tkinter project!
We’ll use the Python Emoji Library to do this.
All we have to do is pip install emoji and then we can add Emojis to our tkinter label widgets (or really any widget!).
Python Code: emo.py
(Github Code)
from tkinter import * import emoji root = Tk() root.title("Emoji's") root.iconbitmap('c:/tkinter.com/codemy.ico') root.geometry('500x350') # Create a Label my_label = Label(root, text=f'{emoji.emojize(":astonished_face:")} {emoji.emojize(":face_screaming_in_fear:")}', font=("Helvetica", 32), fg="red") my_label.pack(pady=50) root.mainloop()
Add comment