I want to decrease the size of a label in tkinter python.
the code:
from tkinter import *
top = Tk()
top.title("...")
top.geometry("200x200")
name = Label(top,text="Type Here: ").place(x = 20,y = 50)
e = Entry(top).place(x = 100, y = 50)
name1 = Label(top,text="Type Here: ").place(x = 20,y = 100)
e1 = Entry(top).place(x = 100, y = 100)
top.mainloop()
CodePudding user response:
I suppose you want to decrease the font size:
name = Label(top,text="Type Here: ", font=("Courier", 11)).place(x = 20,y = 50)
just specify a font and a font size
CodePudding user response:
You can set the width and height of a label like this
name = Label(top,text="Type Here: ", height=100, width=100)
name.place(x = 20,y = 50)
And you can change it with
name.config(height= new_height, width= new_width)
