1

I Created A Simple SpinBox :

import tkinter as tk
win=tk.Tk()
sb=tk.SpinBox(win,from_=1,to=100)
sb.pack()
win.mainloop()

How Can I Set A Default Value Like;

In Combobox we can :
cmb=tk.Combobox(win,width=16)
cmb["value"]=tuple(range(1,100))
cmb.pack()

And:

cmb.current(23)

But How To Set In SpinBox Widget ?

Abhimanyu Sharma
  • 858
  • 1
  • 9
  • 17
  • 1
    You can use `texvariable=` and set it to StringVar (in this case might as well IntVar) instance and set the instance to the value You want – Matiiss Apr 20 '21 at 08:49

0 Answers0