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-
  1. from tkinter import *  
  2. main = Tk()  
  3. w = Spinbox(main, from_=0, to=20)  
  4. w.pack()  
  5. main.mainloop()  
Output-
 
Summary

In this chapter, you learnt what Spinbox widget is and how to use the property of the widget.