- Tkinter GUI Application Development Blueprints(Second Edition)
- Bhaskar Chaudhary
- 176字
- 2021-06-24 18:35:03
The Tkinter geometry manager
You may recall that we used the pack() method to add widgets to the dummy application that we developed in the previous section. The pack() method is an example of geometry management in Tkinter.
The pack() method is not the only way of managing the geometry in your interface. In fact, there are three geometry managers in Tkinter that let you specify the position of widgets inside a top-level or parent window.
The three geometry managers are as follows:
- pack: This is the one that we have used so far. It is simple to use for simpler layouts, but it may get very complex for slightly complex layouts.
- grid: This is the most commonly used geometry manager, and provides a table-like layout of management features for easy layout management.
- place: This is the least popular, but it provides the best control for the absolute positioning of widgets.
Now, let's have a look at some examples of all the three geometry managers in action.
推薦閱讀
- LabVIEW入門與實戰開發100例
- PHP程序設計(慕課版)
- jQuery EasyUI網站開發實戰
- 精通軟件性能測試與LoadRunner實戰(第2版)
- Object-Oriented JavaScript(Second Edition)
- Learn Swift by Building Applications
- Learn WebAssembly
- 算法訓練營:提高篇(全彩版)
- Spring Boot進階:原理、實戰與面試題分析
- Jenkins Continuous Integration Cookbook(Second Edition)
- C語言程序設計
- Learning R for Geospatial Analysis
- JavaScript腳本特效編程給力起飛
- 交互式程序設計(第2版)
- Learning D