Introduction

In this blog, I am going to create a spin box in Python GUI application. When a user clicks “up” and “down” box arrows, the number count will increase and decrease on the application screen.
Software requirement
Python 3.5 and IDLE (Python 3.5)
Programming code
  1. import tkinter as tk
  2. from tkinter import ttk
  3. from tkinter import Spinbox
  4. win = tk.Tk()
  5. #Add a Title
  6. win.title("Python GUI App")
  7. #Label
  8. ttk.Label(win, text="Choose the Number:").grid(column=1,row=1)
  9. #spinbox
  10. spin=Spinbox(win,from_=0,to=100,width=10,bd=5)
  11. spin.grid(column=1,row=2)
  12. #Calling Main()
  13. win.mainloop()
About the code Output