Answers for "text size in tkinter"

4

How to increase text size tkinter

label = Label(root, text="WELCOME TO ScOMPANY", font=("Courier", 44))
Posted by: Guest on April-02-2021
7

tkinter change font family and size of label

from tkinter import *
import tkinter.font as font

gui = Tk(className='Python Examples - Button')
gui.geometry("500x200")

# define font
myFont = font.Font(family='Helvetica', size=20, weight='bold')

# create button
button = Button(gui, text='My Button', bg='#0052cc', fg='#ffffff')
# apply font to the button label
button['font'] = myFont
# add button to gui window
button.pack()

gui.mainloop()
Posted by: Guest on April-14-2020

Python Answers by Framework

Browse Popular Code Answers by Language