Python  3.4.3
About: Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Caution: 3.x is incompatible with 2.x.
  Fossies Dox: Python-3.4.3.tgz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

tkinter.ttk.Treeview Class Reference
Inheritance diagram for tkinter.ttk.Treeview:
Collaboration diagram for tkinter.ttk.Treeview:

Public Member Functions

def __init__ (self, master=None, kw)
 
def bbox
 
def get_children
 
def set_children (self, item, newchildren)
 
def column (self, column, option=None, kw)
 
def delete (self, items)
 
def detach (self, items)
 
def exists (self, item)
 
def focus
 
def heading (self, column, option=None, kw)
 
def identify (self, component, x, y)
 
def identify_row (self, y)
 
def identify_column (self, x)
 
def identify_region (self, x, y)
 
def identify_element (self, x, y)
 
def index (self, item)
 
def insert (self, parent, index, iid=None, kw)
 
def item (self, item, option=None, kw)
 
def move (self, item, parent, index)
 
def next (self, item)
 
def parent (self, item)
 
def prev (self, item)
 
def see (self, item)
 
def selection
 
def selection_set (self, items)
 
def selection_add (self, items)
 
def selection_remove (self, items)
 
def selection_toggle (self, items)
 
def set
 
def tag_bind
 
def tag_configure (self, tagname, option=None, kw)
 
def tag_has
 
- Public Member Functions inherited from tkinter.ttk.Widget
def __init__
 
def identify (self, x, y)
 
def instate (self, statespec, callback=None, args, kw)
 
def state
 
- Public Member Functions inherited from tkinter.BaseWidget
def __init__
 
def destroy (self)
 
- Public Member Functions inherited from tkinter.Misc
def destroy (self)
 
def deletecommand (self, name)
 
def tk_strictMotif
 
def tk_bisque (self)
 
def tk_setPalette (self, args, kw)
 
def tk_menuBar (self, args)
 
def wait_variable
 
def wait_window
 
def wait_visibility
 
def setvar
 
def getvar
 
def getboolean (self, s)
 
def focus_set (self)
 
def focus_force (self)
 
def focus_get (self)
 
def focus_displayof (self)
 
def focus_lastfor (self)
 
def tk_focusFollowsMouse (self)
 
def tk_focusNext (self)
 
def tk_focusPrev (self)
 
def after (self, ms, func=None, args)
 
def after_idle (self, func, args)
 
def after_cancel (self, id)
 
def bell
 
def clipboard_get (self, kw)
 
def clipboard_clear (self, kw)
 
def clipboard_append (self, string, kw)
 
def grab_current (self)
 
def grab_release (self)
 
def grab_set (self)
 
def grab_set_global (self)
 
def grab_status (self)
 
def option_add
 
def option_clear (self)
 
def option_get (self, name, className)
 
def option_readfile
 
def selection_clear (self, kw)
 
def selection_get (self, kw)
 
def selection_handle (self, command, kw)
 
def selection_own (self, kw)
 
def selection_own_get (self, kw)
 
def send (self, interp, cmd, args)
 
def lower
 
def tkraise
 
def colormodel
 
def winfo_atom
 
def winfo_atomname
 
def winfo_cells (self)
 
def winfo_children (self)
 
def winfo_class (self)
 
def winfo_colormapfull (self)
 
def winfo_containing
 
def winfo_depth (self)
 
def winfo_exists (self)
 
def winfo_fpixels (self, number)
 
def winfo_geometry (self)
 
def winfo_height (self)
 
def winfo_id (self)
 
def winfo_interps
 
def winfo_ismapped (self)
 
def winfo_manager (self)
 
def winfo_name (self)
 
def winfo_parent (self)
 
def winfo_pathname
 
def winfo_pixels (self, number)
 
def winfo_pointerx (self)
 
def winfo_pointerxy (self)
 
def winfo_pointery (self)
 
def winfo_reqheight (self)
 
def winfo_reqwidth (self)
 
def winfo_rgb (self, color)
 
def winfo_rootx (self)
 
def winfo_rooty (self)
 
def winfo_screen (self)
 
def winfo_screencells (self)
 
def winfo_screendepth (self)
 
def winfo_screenheight (self)
 
def winfo_screenmmheight (self)
 
def winfo_screenmmwidth (self)
 
def winfo_screenvisual (self)
 
def winfo_screenwidth (self)
 
def winfo_server (self)
 
def winfo_toplevel (self)
 
def winfo_viewable (self)
 
def winfo_visual (self)
 
def winfo_visualid (self)
 
def winfo_visualsavailable
 
def winfo_vrootheight (self)
 
def winfo_vrootwidth (self)
 
def winfo_vrootx (self)
 
def winfo_vrooty (self)
 
def winfo_width (self)
 
def winfo_x (self)
 
def winfo_y (self)
 
def update (self)
 
def update_idletasks (self)
 
def bindtags
 
def bind
 
def unbind
 
def bind_all
 
def unbind_all (self, sequence)
 
def bind_class
 
def unbind_class (self, className, sequence)
 
def mainloop
 
def quit (self)
 
def nametowidget (self, name)
 
def configure (self, cnf=None, kw)
 
def cget (self, key)
 
def __setitem__ (self, key, value)
 
def keys (self)
 
def __str__ (self)
 
def pack_propagate
 
def pack_slaves (self)
 
def place_slaves (self)
 
def grid_anchor
 
def grid_bbox
 
def grid_columnconfigure (self, index, cnf={}, kw)
 
def grid_location (self, x, y)
 
def grid_propagate
 
def grid_rowconfigure (self, index, cnf={}, kw)
 
def grid_size (self)
 
def grid_slaves
 
def event_add (self, virtual, sequences)
 
def event_delete (self, virtual, sequences)
 
def event_generate (self, sequence, kw)
 
def event_info
 
def image_names (self)
 
def image_types (self)
 
- Public Member Functions inherited from tkinter.Pack
def pack_configure (self, cnf={}, kw)
 
def pack_forget (self)
 
def pack_info (self)
 
- Public Member Functions inherited from tkinter.Place
def place_configure (self, cnf={}, kw)
 
def place_forget (self)
 
def place_info (self)
 
- Public Member Functions inherited from tkinter.Grid
def grid_configure (self, cnf={}, kw)
 
def grid_forget (self)
 
def grid_remove (self)
 
def grid_info (self)
 
- Public Member Functions inherited from tkinter.XView
def xview (self, args)
 
def xview_moveto (self, fraction)
 
def xview_scroll (self, number, what)
 
- Public Member Functions inherited from tkinter.YView
def yview (self, args)
 
def yview_moveto (self, fraction)
 
def yview_scroll (self, number, what)
 

Static Public Attributes

 reattach = move
 
- Static Public Attributes inherited from tkinter.Misc
 waitvar = wait_variable
 
 getint = int
 
 getdouble = float
 
 focus = focus_set
 
 lift = tkraise
 
 register = _register
 
 config = configure
 
 propagate = pack_propagate
 
 slaves = pack_slaves
 
 anchor = grid_anchor
 
 bbox = grid_bbox
 
 columnconfigure = grid_columnconfigure
 
 rowconfigure = grid_rowconfigure
 
 size = grid_size
 
- Static Public Attributes inherited from tkinter.Pack
 pack = pack_configure
 
 forget = pack_forget
 
 info = pack_info
 
 propagate = Misc.pack_propagate
 
 slaves = Misc.pack_slaves
 
- Static Public Attributes inherited from tkinter.Place
 place = place_configure
 
 forget = place_forget
 
 info = place_info
 
 slaves = Misc.place_slaves
 
- Static Public Attributes inherited from tkinter.Grid
 grid = grid_configure
 
 bbox = Misc.grid_bbox
 
 columnconfigure = Misc.grid_columnconfigure
 
 forget = grid_forget
 
 info = grid_info
 
 location = Misc.grid_location
 
 propagate = Misc.grid_propagate
 
 rowconfigure = Misc.grid_rowconfigure
 
 size = Misc.grid_size
 
 slaves = Misc.grid_slaves
 

Additional Inherited Members

- Public Attributes inherited from tkinter.BaseWidget
 master
 
 tk
 
 children
 
 widgetName
 

Detailed Description

Ttk Treeview widget displays a hierarchical collection of items.

Each item has a textual label, an optional image, and an optional list
of data values. The data values are displayed in successive columns
after the tree label.

Definition at line 1148 of file ttk.py.

Constructor & Destructor Documentation

def tkinter.ttk.Treeview.__init__ (   self,
  master = None,
  kw 
)
Construct a Ttk Treeview with parent master.

STANDARD OPTIONS

    class, cursor, style, takefocus, xscrollcommand,
    yscrollcommand

WIDGET-SPECIFIC OPTIONS

    columns, displaycolumns, height, padding, selectmode, show

ITEM OPTIONS

    text, image, values, open, tags

TAG OPTIONS

    foreground, background, font, image

Definition at line 1155 of file ttk.py.

Referenced by find_recursionlimit.RecursiveBlowup1.__init__().

Member Function Documentation

def tkinter.ttk.Treeview.bbox (   self,
  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.

Definition at line 1178 of file ttk.py.

References tkinter.Misc._getints(), tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.column (   self,
  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.

Definition at line 1205 of file ttk.py.

References tkinter.Tk._w, tkinter.BaseWidget._w, idlelib.WidgetRedirector.WidgetRedirector.tk, idlelib.WidgetRedirector.OriginalCommand.tk, tkinter.Tk.tk, and tkinter.BaseWidget.tk.

def tkinter.ttk.Treeview.delete (   self,
  items 
)
Delete all specified items and all their descendants. The root
item may not be deleted.

Definition at line 1216 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.detach (   self,
  items 
)
Unlinks all of the specified items from the tree.

The items and all of their descendants are still present, and may
be reinserted at another point in the tree, but will not be
displayed. The root item may not be detached.

Definition at line 1222 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.exists (   self,
  item 
)
Returns True if the specified item is present in the tree,
False otherwise.

Definition at line 1231 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.focus (   self,
  item = None 
)
If item is specified, sets the focus item to item. Otherwise,
returns the current focus item, or '' if there is none.

Definition at line 1237 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.get_children (   self,
  item = None 
)
Returns a tuple of children belonging to item.

If item is not specified, returns root children.

Definition at line 1188 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.heading (   self,
  column,
  option = None,
  kw 
)
Query or modify the heading options for the specified column.

If kw is not given, returns a dict of the heading option values. If
option is specified then the value for that option is returned.
Otherwise, sets the options to the corresponding values.

Valid options/values are:
    text: text
The text to display in the column heading
    image: image_name
Specifies an image to display to the right of the column
heading
    anchor: anchor
Specifies how the heading text should be aligned. One of
the standard Tk anchor values
    command: callback
A callback to be invoked when the heading label is
pressed.

To configure the tree column heading, call this with column = "#0" 

Definition at line 1243 of file ttk.py.

References tkinter.Misc._substitute(), tkinter.Tk._w, tkinter.BaseWidget._w, idlelib.WidgetRedirector.WidgetRedirector.tk, idlelib.WidgetRedirector.OriginalCommand.tk, tkinter.Tk.tk, and tkinter.BaseWidget.tk.

Referenced by texi2html.TexinfoParser.do_appendix(), texi2html.TexinfoParser.do_appendixsec(), texi2html.TexinfoParser.do_appendixsubsec(), texi2html.TexinfoParser.do_appendixsubsubsec(), texi2html.TexinfoParser.do_chapheading(), texi2html.TexinfoParser.do_chapter(), texi2html.TexinfoParser.do_heading(), texi2html.TexinfoParser.do_majorheading(), texi2html.TexinfoParser.do_section(), texi2html.TexinfoParser.do_subheading(), texi2html.TexinfoParser.do_subsection(), texi2html.TexinfoParser.do_subsubheading(), texi2html.TexinfoParser.do_subsubsection(), texi2html.TexinfoParser.do_top(), texi2html.TexinfoParser.do_unnumbered(), texi2html.TexinfoParser.do_unnumberedsec(), texi2html.TexinfoParser.do_unnumberedsubsec(), texi2html.TexinfoParser.do_unnumberedsubsubsec(), turtledemo.bytedesign.Designer.pentpiece(), turtle.TNavigator.setheading(), and turtledemo.bytedesign.Designer.tripiece().

def tkinter.ttk.Treeview.identify (   self,
  component,
  x,
  y 
)
Returns a description of the specified component under the
point given by x and y, or the empty string if no such component
is present at that position.

Definition at line 1275 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.identify_column (   self,
  x 
)
Returns the data column identifier of the cell at position x.

The tree column has ID #0.

Definition at line 1287 of file ttk.py.

References tkinter.ttk.Widget.identify(), tkinter.Scale.identify(), tkinter.Scrollbar.identify(), tkinter.Spinbox.identify(), and tkinter.PanedWindow.identify().

def tkinter.ttk.Treeview.identify_element (   self,
  x,
  y 
)
Returns the element at position x, y.

* Availability: Tk 8.6

Definition at line 1306 of file ttk.py.

References tkinter.ttk.Widget.identify(), tkinter.Scale.identify(), tkinter.Scrollbar.identify(), tkinter.Spinbox.identify(), and tkinter.PanedWindow.identify().

def tkinter.ttk.Treeview.identify_region (   self,
  x,
  y 
)
Returns one of:

heading: Tree heading area.
separator: Space between two columns headings;
tree: The tree area.
cell: A data cell.

* Availability: Tk 8.6

Definition at line 1294 of file ttk.py.

References tkinter.ttk.Widget.identify(), tkinter.Scale.identify(), tkinter.Scrollbar.identify(), tkinter.Spinbox.identify(), and tkinter.PanedWindow.identify().

def tkinter.ttk.Treeview.identify_row (   self,
  y 
)
Returns the item ID of the item at position y.

Definition at line 1282 of file ttk.py.

References tkinter.ttk.Widget.identify(), tkinter.Scale.identify(), tkinter.Scrollbar.identify(), tkinter.Spinbox.identify(), and tkinter.PanedWindow.identify().

def tkinter.ttk.Treeview.insert (   self,
  parent,
  index,
  iid = None,
  kw 
)
Creates a new item and return the item identifier of the newly
created item.

parent is the item ID of the parent item, or the empty string
to create a new top-level item. index is an integer, or the value
end, specifying where in the list of parent's children to insert
the new item. If index is less than or equal to zero, the new node
is inserted at the beginning, if index is greater than or equal to
the current number of children, it is inserted at the end. If iid
is specified, it is used as the item identifier, iid must not
already exist in the tree. Otherwise, a new unique identifier
is generated.

Definition at line 1319 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.item (   self,
  item,
  option = None,
  kw 
)
Query or modify the options for the specified item.

If no options are given, a dict with options/values for the item
is returned. If option is specified then the value for that option
is returned. Otherwise, sets the options to the corresponding
values as given by kw.

Definition at line 1342 of file ttk.py.

References tkinter.Tk._w, tkinter.BaseWidget._w, idlelib.WidgetRedirector.WidgetRedirector.tk, idlelib.WidgetRedirector.OriginalCommand.tk, tkinter.Tk.tk, and tkinter.BaseWidget.tk.

def tkinter.ttk.Treeview.move (   self,
  item,
  parent,
  index 
)
Moves item to position index in parent's list of children.

It is illegal to move an item under one of its descendants. If
index is less than or equal to zero, item is moved to the
beginning, if greater than or equal to the number of children,
it is moved to the end. If item was detached it is reattached.

Definition at line 1354 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

Referenced by turtledemo.nim.NimModel.move(), and turtledemo.nim.NimModel.notify_move().

def tkinter.ttk.Treeview.next (   self,
  item 
)
Returns the identifier of item's next sibling, or '' if item
is the last child of its parent.

Definition at line 1366 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

Referenced by clinic.DSLParser.state_dsl_start(), clinic.DSLParser.state_modulename_name(), clinic.DSLParser.state_parameter(), clinic.DSLParser.state_parameter_docstring(), and clinic.DSLParser.state_parameters_start().

def tkinter.ttk.Treeview.parent (   self,
  item 
)
Returns the ID of the parent of item, or '' if item is at the
top level of the hierarchy.

Definition at line 1372 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.prev (   self,
  item 
)
Returns the identifier of item's previous sibling, or '' if
item is the first child of its parent.

Definition at line 1378 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.see (   self,
  item 
)
Ensure that item is visible.

Sets all of item's ancestors open option to True, and scrolls
the widget if necessary so that item is within the visible
portion of the tree.

Definition at line 1384 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.selection (   self,
  selop = None,
  items = None 
)
def tkinter.ttk.Treeview.selection_add (   self,
  items 
)
Add items to the selection.

Definition at line 1403 of file ttk.py.

References tkinter.filedialog.FileDialog.selection, tkinter.ttk.Treeview.selection(), and tkinter.Spinbox.selection().

def tkinter.ttk.Treeview.selection_remove (   self,
  items 
)
Remove items from the selection.

Definition at line 1408 of file ttk.py.

References tkinter.filedialog.FileDialog.selection, tkinter.ttk.Treeview.selection(), and tkinter.Spinbox.selection().

def tkinter.ttk.Treeview.selection_set (   self,
  items 
)
items becomes the new selection.

Definition at line 1398 of file ttk.py.

References tkinter.filedialog.FileDialog.selection, tkinter.ttk.Treeview.selection(), and tkinter.Spinbox.selection().

def tkinter.ttk.Treeview.selection_toggle (   self,
  items 
)
Toggle the selection state of each item in items.

Definition at line 1413 of file ttk.py.

References tkinter.filedialog.FileDialog.selection, tkinter.ttk.Treeview.selection(), and tkinter.Spinbox.selection().

def tkinter.ttk.Treeview.set (   self,
  item,
  column = None,
  value = None 
)
Query or set the value of given item.

With one argument, return a dictionary of column/value pairs
for the specified item. With two arguments, return the current
value of the specified column. With three arguments, set the
value of given column in given item to the specified value.

Definition at line 1418 of file ttk.py.

References tkinter.Tk._w, tkinter.BaseWidget._w, idlelib.WidgetRedirector.WidgetRedirector.tk, idlelib.WidgetRedirector.OriginalCommand.tk, tkinter.Tk.tk, and tkinter.BaseWidget.tk.

Referenced by asdl_c.ObjVisitor.emitSeq(), life.LifeBoard.make_random(), and asdl_c.ObjVisitor.visitField().

def tkinter.ttk.Treeview.set_children (   self,
  item,
  newchildren 
)
Replaces item's child with newchildren.

Children present in item that are not present in newchildren
are detached from tree. No items in newchildren may be an
ancestor of item.

Definition at line 1196 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.tag_bind (   self,
  tagname,
  sequence = None,
  callback = None 
)
Bind a callback for the given event sequence to the tag tagname.
When an event is delivered to an item, the callbacks for each
of the item's tags option are called.

Definition at line 1433 of file ttk.py.

References tkinter.Misc._bind(), inspect.Signature._bind(), tkinter.Tk._w, and tkinter.BaseWidget._w.

def tkinter.ttk.Treeview.tag_configure (   self,
  tagname,
  option = None,
  kw 
)
Query or modify the options for the specified tagname.

If kw is not given, returns a dict of the option settings for tagname.
If option is specified, returns the value for that option for the
specified tagname. Otherwise, sets the options to the corresponding
values for the given tagname.

Definition at line 1440 of file ttk.py.

References tkinter.Tk._w, tkinter.BaseWidget._w, idlelib.WidgetRedirector.WidgetRedirector.tk, idlelib.WidgetRedirector.OriginalCommand.tk, tkinter.Tk.tk, and tkinter.BaseWidget.tk.

Referenced by idlelib.ColorDelegator.ColorDelegator.config_colors().

def tkinter.ttk.Treeview.tag_has (   self,
  tagname,
  item = None 
)
If item is specified, returns 1 or 0 depending on whether the
specified item has the given tagname. Otherwise, returns a list of
all items which have the specified tag.

* Availability: Tk 8.6

Definition at line 1453 of file ttk.py.

References tkinter.Tk._w, and tkinter.BaseWidget._w.

Member Data Documentation

tkinter.ttk.Treeview.reattach = move
static

Definition at line 1363 of file ttk.py.


The documentation for this class was generated from the following file: