- Tkinter GUI Application Development Cookbook
- Alejandro Rodas de Paz
- 77字
- 2021-08-27 19:44:03
How it works...
To avoid repeating the code of the Radiobutton initialization, we defined a utility method that is called from a list comprehension. We unpacked the values of each tuple of the COLORS list and then passed these local variables as options to Radiobutton. Remember to try to not repeat yourself whenever possible.
Since StringVar is shared among all the Radiobutton instances, they are automatically connected, and we force the user to select only one choice.
推薦閱讀
- C語言程序設計案例教程(第2版)
- Learning Informatica PowerCenter 10.x(Second Edition)
- Effective Python Penetration Testing
- Building Minecraft Server Modifications
- SQL經典實例(第2版)
- Java:High-Performance Apps with Java 9
- C語言程序設計
- SQL基礎教程(第2版)
- C語言程序設計上機指導與習題解答(第2版)
- Mastering Business Intelligence with MicroStrategy
- Python圖形化編程(微課版)
- 零基礎學HTML+CSS第2版
- DevOps 精要:業務視角
- Building Web and Mobile ArcGIS Server Applications with JavaScript(Second Edition)
- Python編程基礎與數據分析