[Python small project Tkinter application] Random roll call/lottery tool optimization: realize the background image and other components adaptive window size changes and keep the relative position and proportion unchanged


Preface

Without further ado, let’s look directly at the effect after optimization:
Please add image description
before optimization:
Please add image description

Isn’t it amazing? Compared with the previous operation that could only be run with a fixed window size, the optimized tool can adapt to devices with different resolutions to better present the tool.

Since the articles on the Internet about the adaptive changes of tkinter components as the window size changes are relatively lengthy and disorganized, this article aims to explain this optimization function systematically, accurately, completely, and usably, so as to realize the implementation of this function. Usability and practicality. <

Guess you like

Origin blog.csdn.net/qq_36584673/article/details/132706639