- Tkinter GUI Application Development Cookbook
- Alejandro Rodas de Paz
- 140字
- 2021-08-27 19:44:03
How it works...
Both classes accept the from_ and to options to indicate the range of valid values—the trailing underscore is necessary because the from option was originally defined in Tcl/Tk, but it is a reserved keyword in Python.
A handy functionality of the Scale class is the resolution option, which sets the precision of the rounding. For instance, a resolution of 0.2 will allow the user to select the values 0.0, 0.2, 0.4, and so on. The value of this option is 1 by default, so the widget rounds all values to the nearest integer.
As usual, the value of each widget can be retrieved with the get() method. An important difference is that Spinbox returns the number as a string, whereas Scale returns an integer value or a float value if the rounding accepts decimal values.
- C語言程序設(shè)計案例教程
- Software Defined Networking with OpenFlow
- PHP 從入門到項目實踐(超值版)
- HTML5+CSS3網(wǎng)站設(shè)計教程
- JavaScript 程序設(shè)計案例教程
- 數(shù)據(jù)結(jié)構(gòu)與算法分析(C++語言版)
- Windows Phone 7.5:Building Location-aware Applications
- Arduino計算機視覺編程
- IDA Pro權(quán)威指南(第2版)
- C語言程序設(shè)計實訓(xùn)教程與水平考試指導(dǎo)
- ASP.NET Web API Security Essentials
- Python面試通關(guān)寶典
- Python Linux系統(tǒng)管理與自動化運維
- Java EE程序設(shè)計與開發(fā)實踐教程
- Spring Web Services 2 Cookbook