tkinter.ttk.Treeview.bbox()

bbox(item, column=None) Returns the bounding box (relative to the treeview widget’s window) of the specified item in the form (x, y, width, height). If column is specified, returns the bounding box of that cell. If the item is not visible (i.e., if it is a descendant of a closed item or is scrolled offscreen), returns an empty string.

tkinter.ttk.Treeview.column()

column(column, option=None, **kw) Query or modify the options for the specified column. If kw is not given, returns a dict of the column option values. If option is specified then the value for that option is returned. Otherwise, sets the options to the corresponding values. The valid options/values are: id Returns the column name. This is a read-only option. anchor: One of the standard Tk anchor values. Specifies how the text in this column should be aligned with respect to the cell.

tkinter.ttk.Style.theme_create()

theme_create(themename, parent=None, settings=None) Create a new theme. It is an error if themename already exists. If parent is specified, the new theme will inherit styles, elements and layouts from the parent theme. If settings are present they are expected to have the same syntax used for theme_settings().

tkinter.ttk.Style.theme_names()

theme_names() Returns a list of all known themes.

tkinter.ttk.Style.layout()

layout(style, layoutspec=None) Define the widget layout for given style. If layoutspec is omitted, return the layout specification for given style. layoutspec, if specified, is expected to be a list or some other sequence type (excluding strings), where each item should be a tuple and the first item is the layout name and the second item should have the format described in Layouts. To understand the format, see the following example (it is not intended to do anything useful): from tkinter im

tkinter.ttk.Style.map()

map(style, query_opt=None, **kw) Query or sets dynamic values of the specified option(s) in style. Each key in kw is an option and each value should be a list or a tuple (usually) containing statespecs grouped in tuples, lists, or some other preference. A statespec is a compound of one or more states and then a value. An example may make it more understandable: import tkinter from tkinter import ttk root = tkinter.Tk() style = ttk.Style() style.map("C.TButton", foreground=[('pressed',

tkinter.ttk.Style.lookup()

lookup(style, option, state=None, default=None) Returns the value specified for option in style. If state is specified, it is expected to be a sequence of one or more states. If the default argument is set, it is used as a fallback value in case no specification for option is found. To check what font a Button uses by default: from tkinter import ttk print(ttk.Style().lookup("TButton", "font"))

tkinter.ttk.Style.theme_settings()

theme_settings(themename, settings) Temporarily sets the current theme to themename, apply specified settings and then restore the previous theme. Each key in settings is a style and each value may contain the keys ‘configure’, ‘map’, ‘layout’ and ‘element create’ and they are expected to have the same format as specified by the methods Style.configure(), Style.map(), Style.layout() and Style.element_create() respectively. As an example, let’s change the Combobox for the default theme a bit:

tkinter.ttk.Style.element_options()

element_options(elementname) Returns the list of elementname‘s options.

tkinter.ttk.Style.element_create()

element_create(elementname, etype, *args, **kw) Create a new element in the current theme, of the given etype which is expected to be either “image”, “from” or “vsapi”. The latter is only available in Tk 8.6a for Windows XP and Vista and is not described here. If “image” is used, args should contain the default image name followed by statespec/value pairs (this is the imagespec), and kw may have the following options: border=padding padding is a list of up to four integers, specifying the