Python  3.4.2
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.2.tgz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
tkinter.ttk.Treeview Class Reference
Inheritance diagram for tkinter.ttk.Treeview:
Collaboration diagram for tkinter.ttk.Treeview:

Public Member Functions

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

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: