Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a window fullscreen in customtkinter?

Tkinter has this method:

window_name.attributes('-fullscreen',True)

and customtkinter?

I haven't found anything but

geometry(f"{WIDTH}x{HEIGHT}")

However when I grab screen size and put as WIDTH & HEIGHT the screen does change the size but does not go full size, I mean it is always shifted to the right so the windows leaves the margin on the left and top and the part of the window goes out of the screen to the right.

like image 980
nickornotto Avatar asked Sep 19 '25 13:09

nickornotto


1 Answers

There are two functions you have to call to setup full screen (at least on Linux).

    self.wm_attributes('-fullscreen', True)
    self.state('normal')  # This call is appears to be necessary to make the app actually go full screen.

This works on customtkinter v5.2

like image 148
Dan Morphis Avatar answered Sep 22 '25 07:09

Dan Morphis