How to Dynamically Adjust Window Size Based on Content #2740
Replies: 2 comments
-
You need to use Regards. |
Beta Was this translation helpful? Give feedback.
-
I finally found what was causing the issue. In the projects where automatic window resizing based on the widgets didn't work, I had the following function call:
def rescale(self):
ctk.set_widget_scaling(self.scaling)
ctk.set_window_scaling(self.scaling) Once I commented out that line, the auto-resizing behavior worked perfectly. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’m working on a project where the window size automatically adjusts based on the content inside and it works perfectly in that case. However, I haven’t been able to replicate this behavior in other projects.
As a workaround, I’ve been setting an initial window size based on the largest expected content, but I’d prefer to achieve true dynamic resizing.
Could someone explain what needs to be set for this behavior to work? If possible, a simple example would be very helpful.
I’ve attached a short video demonstrating the behavior I’m aiming for from my working project:
auto_win_resizing.mp4
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions