Automatic Window size detection
Hello,
I apologise in advance if this issue has already been mentioned,but I am using customtkinter and I have created an application on my laptop (1920x1080, Scaling 100%). The application I am working on will be used on other displays and I dont't know their resoluton or scaling. I would like my app to change on the basis of the display resolution and scaling. Is that possible and if yes could you please help me?
Thanks in advance,
Cheers
Still need help with this?
Yeah
def on_window_resize(event): # print each time the windows is resize
width = event.width
height = event.height
# print(f"Window resized to {width}x{height}")
# SIZE_MAIN=[width,height]
# return SIZE_MAIN
# Bind the resize event to a function
self.bind("<Configure>", on_window_resize)
in children
master.master.bind("<Configure>", self.on_window_resize)
master.master.bind("<Configure>", self.on_window_resize)
The problem is not the window of the application only. The biggest problem is how the widgets do not change size upon resizing of the window.
I dont really know whats the problem or whats not working exactly, by default the widgets should adapt to the display scaling, so they should be the same size on all displays.
Yeaaah also which one placement method u'r using ? (pack/place/grid) each method have not the same effect :p
like, sticky in grid methid, is like expand in pack