Module Tkinter :: Class Spinbox
[hide private]
[frames] | no frames]

_ClassType Spinbox

  Misc --+        
         |        
BaseWidget --+    
             |    
      Pack --+    
             |    
     Place --+    
             |    
      Grid --+    
             |    
  Tix.Form --+    
             |    
        Widget --+
                 |
                Spinbox

spinbox widget.

Nested Classes [hide private]

Inherited from Misc: getdouble, getint

Instance Methods [hide private]
 
__init__(self, master=None, cnf={}, **kw)
Construct a spinbox widget with the parent MASTER.
 
bbox(self, index)
Return a tuple of X1,Y1,X2,Y2 coordinates for a rectangle which encloses the character given by index.
 
delete(self, first, last=None)
Delete one or more elements of the spinbox.
 
get(self)
Returns the spinbox's string
 
icursor(self, index)
Alter the position of the insertion cursor.
 
identify(self, x, y)
Returns the name of the widget at position x, y
 
index(self, index)
Returns the numerical index corresponding to index
 
insert(self, index, s)
Insert string s at index
 
invoke(self, element)
Causes the specified element to be invoked
 
scan(self, *args)
Internal function.
 
scan_mark(self, x)
Records x and the current view in the spinbox window;
 
scan_dragto(self, x)
Compute the difference between the given x argument and the x argument to the last scan mark command
 
selection(self, *args)
Internal function.
 
selection_adjust(self, index)
Locate the end of the selection nearest to the character given by index,
 
selection_clear(self)
Clear the selection
 
selection_element(self, element=None)
Sets or gets the currently selected element.

Inherited from BaseWidget: destroy

Inherited from BaseWidget (private): _do, _setup

Inherited from Misc: __getitem__, __setitem__, __str__, after, after_cancel, after_idle, bell, bind, bind_all, bind_class, bindtags, cget, clipboard_append, clipboard_clear, clipboard_get, colormodel, columnconfigure, config, configure, deletecommand, event_add, event_delete, event_generate, event_info, focus, focus_displayof, focus_force, focus_get, focus_lastfor, focus_set, getboolean, getvar, grab_current, grab_release, grab_set, grab_set_global, grab_status, grid_bbox, grid_columnconfigure, grid_location, grid_propagate, grid_rowconfigure, grid_size, grid_slaves, image_names, image_types, keys, lift, lower, mainloop, nametowidget, option_add, option_clear, option_get, option_readfile, pack_propagate, pack_slaves, place_slaves, propagate, quit, register, rowconfigure, selection_get, selection_handle, selection_own, selection_own_get, send, setvar, size, slaves, tk_bisque, tk_focusFollowsMouse, tk_focusNext, tk_focusPrev, tk_menuBar, tk_setPalette, tk_strictMotif, tkraise, unbind, unbind_all, unbind_class, update, update_idletasks, wait_variable, wait_visibility, wait_window, waitvar, winfo_atom, winfo_atomname, winfo_cells, winfo_children, winfo_class, winfo_colormapfull, winfo_containing, winfo_depth, winfo_exists, winfo_fpixels, winfo_geometry, winfo_height, winfo_id, winfo_interps, winfo_ismapped, winfo_manager, winfo_name, winfo_parent, winfo_pathname, winfo_pixels, winfo_pointerx, winfo_pointerxy, winfo_pointery, winfo_reqheight, winfo_reqwidth, winfo_rgb, winfo_rootx, winfo_rooty, winfo_screen, winfo_screencells, winfo_screendepth, winfo_screenheight, winfo_screenmmheight, winfo_screenmmwidth, winfo_screenvisual, winfo_screenwidth, winfo_server, winfo_toplevel, winfo_viewable, winfo_visual, winfo_visualid, winfo_visualsavailable, winfo_vrootheight, winfo_vrootwidth, winfo_vrootx, winfo_vrooty, winfo_width, winfo_x, winfo_y

Inherited from Pack: forget, info, pack, pack_configure, pack_forget, pack_info

Inherited from Place: place, place_configure, place_forget, place_info

Inherited from Grid: grid, grid_configure, grid_forget, grid_info, grid_remove, location

Inherited from Tix.Form: check, form

Class Variables [hide private]

Inherited from Misc: _noarg_

Inherited from Misc (private): _subst_format, _subst_format_str, _tclCommands

Method Details [hide private]

__init__(self, master=None, cnf={}, **kw)
(Constructor)

 
Construct a spinbox widget with the parent MASTER.

STANDARD OPTIONS

    activebackground, background, borderwidth,
    cursor, exportselection, font, foreground,
    highlightbackground, highlightcolor,
    highlightthickness, insertbackground,
    insertborderwidth, insertofftime,
    insertontime, insertwidth, justify, relief,
    repeatdelay, repeatinterval,
    selectbackground, selectborderwidth
    selectforeground, takefocus, textvariable
    xscrollcommand.

WIDGET-SPECIFIC OPTIONS

    buttonbackground, buttoncursor,
    buttondownrelief, buttonuprelief,
    command, disabledbackground,
    disabledforeground, format, from,
    invalidcommand, increment,
    readonlybackground, state, to,
    validate, validatecommand values,
    width, wrap,

Overrides: BaseWidget.__init__

bbox(self, index)

 

Return a tuple of X1,Y1,X2,Y2 coordinates for a rectangle which encloses the character given by index.

The first two elements of the list give the x and y coordinates of the upper-left corner of the screen area covered by the character (in pixels relative to the widget) and the last two elements give the width and height of the character, in pixels. The bounding box may refer to a region outside the visible area of the window.

Overrides: Grid.grid_bbox

delete(self, first, last=None)

 

Delete one or more elements of the spinbox.

First is the index of the first character to delete, and last is the index of the character just after the last one to delete. If last isn't specified it defaults to first+1, i.e. a single character is deleted. This command returns an empty string.

icursor(self, index)

 

Alter the position of the insertion cursor.

The insertion cursor will be displayed just before the character given by index. Returns an empty string

identify(self, x, y)

 

Returns the name of the widget at position x, y

Return value is one of: none, buttondown, buttonup, entry

insert(self, index, s)

 

Insert string s at index

Returns an empty string.

invoke(self, element)

 

Causes the specified element to be invoked

The element could be buttondown or buttonup triggering the action associated with it.

scan_mark(self, x)

 

Records x and the current view in the spinbox window;

used in conjunction with later scan dragto commands. Typically this command is associated with a mouse button press in the widget. It returns an empty string.

scan_dragto(self, x)

 

Compute the difference between the given x argument and the x argument to the last scan mark command

It then adjusts the view left or right by 10 times the difference in x-coordinates. This command is typically associated with mouse motion events in the widget, to produce the effect of dragging the spinbox at high speed through the window. The return value is an empty string.

selection_adjust(self, index)

 

Locate the end of the selection nearest to the character given by index,

Then adjust that end of the selection to be at index (i.e including but not going beyond index). The other end of the selection is made the anchor point for future select to commands. If the selection isn't currently in the spinbox, then a new selection is created to include the characters between index and the most recent selection anchor point, inclusive. Returns an empty string.

selection_clear(self)

 

Clear the selection

If the selection isn't in this widget then the command has no effect. Returns an empty string.

Overrides: Misc.selection_clear

selection_element(self, element=None)

 

Sets or gets the currently selected element.

If a spinbutton element is specified, it will be displayed depressed