Tkinter Widget-SpinBox
Spinbox is used to create a fixed number entry, which means the user can select a number between a fixed range.
Syntax-
w = Spinbox(master, option)
Parameter-
Main- parent Window.
Option- attribute of spinbox widget.
Example-
- from tkinter import *
- main = Tk()
- w = Spinbox(main, from_=0, to=20)
- w.pack()
- main.mainloop()
Output-
Summary
In this chapter, you learnt what Spinbox widget is and how to use the property of the widget.