TomSchimansky / CustomTkinter

A modern and customizable python UI-library based on Tkinter
MIT License
11.6k stars 1.09k forks source link

customtkinter wm_state('zoomed') not working !! #1582

Open ivault713 opened 1 year ago

ivault713 commented 1 year ago

import customtkinter

root = customtkinter.CTk() root.wm_state('zoomed') root.mainloop()

The wm_state method is not working. When I run the code the window pops up in the screen in a zoomed way, but suddenly it resized to the normal small window. Please someone reply ! or Is there any other idea to maximize the window when the code starts ?

sukhov-andrii commented 1 year ago

It may be issue on customtkinter. wm_state('zoomed') works fine after the window is visible. So you can delay the calling wm_state() a bit using .after().

Solution: root.after(0, lambda: root.wm_state('zoomed'))