All Python Tkinter Fonts Code Example


Example 1: python tkinter font

import tkinter from tkinter.font import Font  root = tkinter.Tk()  font_1 = Font(family='Arial',                size=24,                weight='normal',                slant='italic',                underline=1,                overstrike=1)  font_2 = Font(family='Helvetica',               size=12,               weight='bold',               slant='italic',               underline=0,               overstrike=0)  font_3 = Font(family='Courier', size=14, weight='normal', slant='roman', underline=0, overstrike=0) font_4 = Font(family='Times', size=22, weight='bold', slant='roman', underline=0, overstrike=0)  my_label = tkinter.Label(master=root, text='Text', font=font_1) my_label.pack()  tkinter.mainloop()

Example 2: font in tkinter

import tkinter.font as TkFont  font = tkFont.Font ( option, ... ) # Exaple helv36 = tkFont.Font(family="Helvetica",size=36,weight="bold")

Comments

Popular posts from this blog

Chemistry - Bond Angles In NH3 And NCl3

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?