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(self)[source]

Return name of icon to be displayed normally.

GetLabelText(self)[source]

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

GetSelectedIconName(self)[source]

Return name of icon to be displayed when selected.

GetSubList(self)[source]

Return list of items forming sublist.

GetText(self)[source]

Return text string to display.

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

Return whether the item’s text may be edited.

IsExpandable(self)[source]

Return whether there are subitems.

OnDoubleClick(self)[source]

Called on a double-click on the item.

OnSelect(self)[source]

Called when item selected.

SetText(self, text)[source]

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

__init__(self)[source]

Constructor. Do whatever you need to do.

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

Bases: object

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