0
  1. I am trying to keep the title in centre when resizing the window
  2. I tried to change the label and to import * modules from tkinter for possible solution
  3. Any help or hint is highly appreciated
  4. following is the attached code:
import tkinter as t

root=t.Tk()

root.geometry("1000x500")
'''Login/Register page '''

root.title("LOGIN PAGE")


bankLabel=t.Label(text="Bank of DINAGOD")
bankLabel.pack(fill='x')
bankLabel.place(x=475)

root.mainloop()
Matiiss
  • 5,970
  • 2
  • 12
  • 29
  • If you are using place after you pack it, you unpack it automatically. To *fill* with place you need `place(... ,relx=1..)`. [Take a look here](https://stackoverflow.com/questions/63536505/how-do-i-organize-my-tkinter-appllication/63536506#63536506) – Thingamabobs Dec 25 '21 at 11:01
  • @Thingamabobs did you mean `relwidth=1`? (which wouldn't be exactly filling anyways if that `x` coord was used) – Matiiss Dec 25 '21 at 11:13
  • @Matiiss my bad, yes I meant that. I'm not used to place anyway. Thanks for clearing this mistake. – Thingamabobs Dec 25 '21 at 12:39

1 Answers1

0

You can't use both pack() and place() function on the same widget. Use only pack() function to declare the positions of your widget.

Gahan Vig
  • 196
  • 2
  • 13