How to use 2 different fonts in the same Label?
For txt1 one font and txt2 another different font
IE: Label(container_frame3, text=txt1+txt2,width=14)
How to use 2 different fonts in the same Label?
For txt1 one font and txt2 another different font
IE: Label(container_frame3, text=txt1+txt2,width=14)
I solved my problem using this : enter link description here
from tkinter import *
from tkinter.font import Font
root = Tk()
root.title('Example 2 fonts')
root.geometry('{}x{}'.format(300, 300))
#Fonts
big_font = Font(family='Helvetica', size=12, weight='bold')
small_font = Font(family='Helvetica', size=8)
container_frame3= Frame(root, highlightbackground="gray80", highlightcolor="gray80", highlightthickness=1,bd=0,bg='red')
container_frame3.grid(row=0,sticky="nsew")
datalabel= Label(container_frame3, text="{}".format('21.15 %\n\n'),width=12,font=big_font,justify=CENTER,bg='blue')
datalabel.grid(row=0, column=0)
datalabel= Label(container_frame3, text='Mbps', font=small_font)
datalabel.grid(row=0, column=0)
root.mainloop()
that results in :solve
Now I have he problem to put that info in the middle of the frame I used sticky='w'
But doesnt work