This is an unofficial mirror of Tkinter reference documentation (based on Python 2.7 and Tk 8.5) created by the late John Shipman.
It was last updated in 2013 and is unmaintained. [More info]
The methods shown here are available on all the ttk widgets.
This method returns the value for the specified
To set one or more widget options, use keyword
arguments of the form
. For example, to set a
font, you might use an
argument such as “
If you provide no arguments, the method will return a
dictionary of all the widget's current option values. In
this dictionary, the keys will be the option names, and
each related value will be a tuple
||The option name.|
||The database name of the option.|
||The database class of the option.|
||The default value of the option.|
||The current value of the option.|
Use this to determine what element is at a given
location within the widget. If the point
( relative to the widget is
somewhere within the widget, this method returns
the name of the element at that position; otherwise
it returns an empty string.
stateSpec, callback=None, *args, **kw)
The purpose of this to determine whether the widget is in a specified state or combination of states.
If you provide a callable value as the
callback argument, and the widget matches
the state or combination of states specified by the
argument, that callable will be called with
*args and keyword
**kw. If the widget's state
does not match
callback will not be called.
If you don't provide a
argument, the method will return
if the widget's state matches
For the structure of the
argument, see Section 46.1, “Specifying widget states in ttk”.
Use this item either to query a widget to determine its current states, or to set or clear one state.
If you provide a
of the form described in Section 46.1, “Specifying widget states in ttk”, the method will set or
clear states in the widget according to that
For example, for a widget
w.state(['!disabled', 'selected']) would clear the widget's
set and set its