The Spinbox widget is an alternative to the Entry widget. It provides the range of values to the user, out of which, the user can select the one.
It is used in the case where a user is given some fixed number of values to choose from.
We can use various options with the Spinbox to decorate the widget. The syntax to use the Spinbox is given below.
A list of possible options is given below.
||The background color of the widget when it has the focus.
||The background color of the widget.
||The border width of the widget.
||The associated callback with the widget which is called each time the state of the widget is called.
||The mouse pointer is changed to the cursor type assigned to this option.
||The background color of the widget when it is disabled.
||The foreground color of the widget when it is disabled.
||The normal foreground color of the widget.
||The font type of the widget content.
||This option is used for the format string. It has no default value.
||It is used to show the starting range of the widget.
||It is used to specify the justification of the multi-line widget content. The default is LEFT.
||It is used to specify the type of the border. The default is SUNKEN.
||This option is used to control the button auto repeat. The value is given in milliseconds.
||It is similar to repeatdelay. The value is given in milliseconds.
||It represents the state of the widget. The default is NORMAL. The possible values are NORMAL, DISABLED, or "readonly".
||It is like a control variable which is used to control the behaviour of the widget text.
||It specify the maximum limit of the widget value. The other is specified by the from_ option.
||This option controls how the widget value is validated.
||It is associated to the function callback which is used for the validation of the widget content.
||It represents the tuple containing the values for this widget.
||It is same as validation command.
||It represents the width of the widget.
||This option wraps up the up and down button the Spinbox.
||This options is set to the set() method of scrollbar to make this widget horizontally scrollable.
There are the following methods associated with the widget.
||This method is used to delete the characters present at the specified range.
||It is used to get the characters present in the specified range.
||It is used to identify the widget's element within the specified range.
||It is used to get the absolute value of the given index.
||This method is used to insert the string at the specified index.
||It is used to invoke the callback associated with the widget.