Bad geometry specifier - Python error

preview_player
Показать описание
Bad geometry specifier error shows up if you didn't use letter x in geometry module.
Рекомендации по теме
Комментарии
Автор

Please help what is wrong with below code:

window_width = 500
window_height = 500
screen_width = window.winfo_screenwidth()
screen_height = window.winfo_screenheight()

x = int((screen_width/2) - (screen_width/2))
y = int((screen_height/2) - (screen_height/2))

window.geometry("{}x{}+{}+{})".format(window_width, window_height, x, y))


I am getting the below error:
_tkinter.TclError: bad geometry specifier "500x500+0+0)"

treasurekahitu
Автор

thank you so much it's very helpful me

hetvipanchal