CTk Fullscreen window #1500
Replies: 5 comments 2 replies
-
customtkinter.CTk objects can be sent in fullscreen mode by changing the root.attributes("-fullscreen", "True") Here's a code snippet from a project I'm working on if __name__ == "__main__":
app = App()
app.title("Mega Mart Self Checkout System")
app.attributes("-fullscreen", "True")
app.columnconfigure(0, weight=1)
app.rowconfigure(0, weight=1)
app.mainloop() |
Beta Was this translation helpful? Give feedback.
-
Is it a maximized window that you are trying to get? |
Beta Was this translation helpful? Give feedback.
-
My code is working zoomed without problem, my code: ` class App(CTk):
if name == "main": ` it's my main.py |
Beta Was this translation helpful? Give feedback.
-
When you want to start in maximized state then you can achieve it this way:
"w._state_before_windows_set_titlebar_color" attribute is not handled correctly inside _windows_set_titlebar_color(), which means that in mainloop() your predefined state will be forgotten unless you define the attribute manually |
Beta Was this translation helpful? Give feedback.
-
Hi @Cruzerskill , You could try doing this if from customtkinter import *
root = CTk()
width = root.winfo_screenwidth()
height = root.winfo_screenheight()
geometry = str(width) + "x" + str(height)
root.geometry(geometry)
root.mainloop() Hope it helps |
Beta Was this translation helpful? Give feedback.
-
I am working on a new project and this is my first attempt to use CTk. Is there a command available for fullscreen window on CTk that is similar to this one? upon looking for similar discussions, it seems that other commands for fullscreen window is not working as well.
Beta Was this translation helpful? Give feedback.
All reactions