开发者

Tkinter: Updating GUI after resizing a window

开发者 https://www.devze.com 2023-04-11 12:00 出处:网络
I have a GUI layout that has two dependencies on the screen size: line numbering and tab sizing. When the screen is resized how开发者_C百科ever, I have to manually update winfo_height() and winfo_widt

I have a GUI layout that has two dependencies on the screen size: line numbering and tab sizing. When the screen is resized how开发者_C百科ever, I have to manually update winfo_height() and winfo_width() to change the layout by calling it directly. After searching the interwebs I think I should use update_idletasks, but how exactly do you use this method?


update_idletasks merely runs any pending ‘idle' tasks, such as screen redraws.

I don't think there is any way to get a notification of when the resolution of the screen changes, is that what you are looking for?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号