direct.tkwidgets.Tree

from direct.tkwidgets.Tree import TreeItem, TreeNode

Defines tree widgets for the tkinter GUI system.

Inheritance diagram

Inheritance diagram of direct.tkwidgets.Tree

class TreeItem[source]

Bases: object

Abstract class representing tree items.

Methods should typically be overridden, otherwise a default action is used.

GetIconName()[source]

Return name of icon to be displayed normally.

GetLabelText()[source]

Return label text string to display in front of text (if any).

GetSelectedIconName()[source]

Return name of icon to be displayed when selected.

GetSubList()[source]

Return list of items forming sublist.

GetText()[source]

Return text string to display.

GetTextBg()[source]
GetTextFg()[source]
IsEditable()[source]

Return whether the item’s text may be edited.

IsExpandable()[source]

Return whether there are subitems.

OnDoubleClick()[source]

Called on a double-click on the item.

OnSelect()[source]

Called when item selected.

SetText(text)[source]

Change the item’s text (if it is editable).

__init__()[source]

Constructor. Do whatever you need to do.

class TreeNode(canvas, parent, item, menuList=[])[source]

Bases: object

__init__(canvas, parent, item, menuList=[])[source]
collapse(event=None)[source]
createPopupMenu()[source]
deselect(event=None)[source]
deselectall()[source]
deselecttree()[source]
destroy()[source]
draw(x, y, fUseCachedChildren=1)[source]
drawicon()[source]
drawtext()[source]
edit(event=None)[source]
edit_cancel(event=None)[source]
edit_finish(event=None)[source]
expand(event=None)[source]
find(searchKey)[source]
flip(event=None)[source]
geticonimage(name)[source]
lastvisiblechild()[source]
popupMenu(event=None)[source]
popupMenuCommand()[source]
reveal()[source]
select(event=None)[source]
select_or_edit(event=None)[source]
setChildrenTag(tag, fModeChildrenTag)[source]
setFSortChildren(fSortChildren)[source]
update(fUseCachedChildren=1, fExpandMode=0)[source]
updateAll(fMode, depth=0, fUseCachedChildren=1)[source]
view()[source]