- Tkinter GUI Application Development Cookbook
- Alejandro Rodas de Paz
- 135字
- 2021-08-27 19:44:09
There's more…
The sticky option indicates the borders where the widget should stick, expressed in cardinal directions: north, south, west and east. These values are represented by the Tkinter constants tk.N, tk.S, tk.W, and tk.E, as well as the combined versions tk.NW, tk.NE, tk.SW, and tk.SE.
For example, sticky=tk.N aligns the widget to the top border of the cell (north), whereas sticky=tk.SE positions the widget in the bottom-right corner of the cell (south-east).
Since these constants represent their corresponding lowercase letters, we shorthanded the tk.N + tk.S + tk.W + tk.E expression with the "nswe" string. This means that the widget should expand both horizontally and vertically—similar to the fill=tk.BOTH option of the Pack geometry manager.
If no value is passed to the sticky option, the widget is centered within the cell.
- Java程序設計與開發
- C語言程序設計(第3版)
- Web Development with Django Cookbook
- 前端架構:從入門到微前端
- Building Mapping Applications with QGIS
- Amazon S3 Cookbook
- Microsoft Dynamics GP 2013 Reporting, Second Edition
- Python:Master the Art of Design Patterns
- C語言程序設計
- Building Serverless Applications with Python
- Learning Probabilistic Graphical Models in R
- 機器學習與R語言實戰
- C/C++程序員面試指南
- 編程菜鳥學Python數據分析
- Julia for Data Science