- Tkinter GUI Application Development Cookbook
- Alejandro Rodas de Paz
- 131字
- 2021-08-27 19:44:00
How it works...
The most basic way of instantiation of Button is using the text option to set the button label and the command option that references the function to be invoked when the button is clicked.
In out example, we also added PhotoImage via the image option, which takes precedence over the text string. The compound option serves to combine image and text in the same button, determining the position where the image is placed. It accepts the following constants as valid values: CENTER, BOTTOM, LEFT, RIGHT, and TOP.
The second row of buttons is created with a list comprehension, using the list of RELIEF values. The label of each button corresponds to the name of the constant, so you can note the difference in the appearance of each button.
推薦閱讀
- Drupal 8 Blueprints
- Java面向對象軟件開發
- PHP+MySQL+Dreamweaver動態網站開發實例教程
- Java性能權威指南(第2版)
- Mastering AndEngine Game Development
- 編譯系統透視:圖解編譯原理
- Hands-On Swift 5 Microservices Development
- Python 3.7從入門到精通(視頻教學版)
- Python網絡爬蟲技術與應用
- Clojure for Java Developers
- Moodle 3 Administration(Third Edition)
- Python Machine Learning Cookbook
- 零基礎學SQL(升級版)
- Android項目實戰:博學谷
- 少年小魚的魔法之旅:神奇的Python