In this recipe, we will use a Spinbox widget, and we will also bind the Enter key on the keyboard to one of our widgets. The Spinbox widget is a one-line widget, like the Entry widget, with the additional capability to restrict the values it will display. It also has some small up/down arrows to scroll up and down between the values.
Using a spin box control
Getting ready
We will use our tabbed GUI, from the How to create the title of a tkinter window form recipe, and add a Spinbox widget above the ScrolledText control. This simply requires us to increment the ScrolledText row value by one and insert our new Spinbox control in the row above the Entry widget.