from tkinter import * window = Tk() window.title("List") window.geometry("700x450") window.configure(bg="orange red") #center this label Label (window, text="List", bg="orange red", fg="white", font="none 24 bold").grid(row=0, column=0) Label (window, text="Enter something here:", bg="orange red", fg="white", font="none 12 bold").grid(row=1, column=0, sticky=W) window.mainloop()I want it to be in the center regardless of the size of the window. So if someone resizes the window, it stays in the center
[Tkinter] How do I center this text in tkinter?
Messages In This Thread |
How do I center this text in tkinter? - by ejected - Mar-29-2019, 04:37 PM
RE: How do I center this text in tkinter? - by Larz60+ - Mar-29-2019, 05:57 PM
RE: How do I center this text in tkinter? - by ejected - Mar-29-2019, 08:27 PM
RE: How do I center this text in tkinter? - by Larz60+ - Mar-29-2019, 10:06 PM
RE: How do I center this text in tkinter? - by woooee - Mar-29-2019, 10:35 PM
|
Users browsing this thread: 2 Guest(s)