PyDocs

Nav

Graphical user interfaces with Tk

Spinbox

tkinter

class
  • Spinbox(master=None, cnf={}, **kw)
A Spinbox widget is an Entry-like widget with a pair of up/down arrow buttons that let the user step through a range of values in addition to editing the value directly. The set of values may be a numeric range given by the from_, to and increment options, or an explicit list of strings given by the values option (which takes precedence over the range). Each time an arrow is invoked the command callback, if any, is called; the boolean wrap option controls whether stepping past either end of the range wraps around to the other end; the format option specifies how numeric values are formatted; and the validate option enables validation of the entered text. Inherits from Widget and XView.
Members of Spinbox

b

bbox
Return a tuple of four integers (x, y, width, height) describing the bounding box of the character given by index.

d

delete
Delete one or more characters of the spinbox.

g

get
Return the spinbox’s string.

i

icursor
Arrange for the insertion cursor to be displayed just before the character given by index.
identify
Return the name of the window element at the pixel coordinates x, y: one of 'buttondown', 'buttonup', 'entry' or 'none'.
index
Return the numerical index corresponding to index, as a string.
insert
Insert the characters of the string s just before the character given by index.
invoke
Invoke the spin button given by element, either 'buttonup' or 'buttondown', triggering the action associated with it.

s

scan
A thin wrapper around the Tk scan widget subcommand, used to implement fast dragging of the view: scan('mark', x) records x and the current view, and scan('dragto', x) adjusts the view relative to th…
scan_dragto
Adjust the view by 10 times the difference between x and the x passed to the last scan_mark() call.
scan_mark
Record x and the current view in the spinbox window, for use with a later scan_dragto() call.
selection
A thin wrapper around the Tk selection widget subcommand, used to adjust the selection within the spinbox.
selection_adjust
Locate the end of the selection nearest to the character given by index and adjust that end of the selection to be at index (including but not going beyond index).
selection_clear
Clear the selection if it is currently in this widget.
selection_element
Set or get the currently selected element.
selection_from
Set the selection anchor point to just before the character given by index, without changing the selection itself.
selection_present
Return True if there are characters selected in the spinbox, False otherwise.
selection_range
Set the selection to include the characters starting with the one indexed by start and ending with the one just before end.
selection_to
Set the selection between index and the anchor point.
0 Examples
No examples for tkinter/Spinbox.
See Also
No see-alsos for tkinter/Spinbox
0 Notes
No notes for Spinbox