Package wx :: Class TreeCtrl
[frames | no frames]

Type TreeCtrl

object --+                
         |                
    Object --+            
             |            
    EvtHandler --+        
                 |        
            Window --+    
                     |    
               Control --+
                         |
                        TreeCtrl

Known Subclasses:
FillingTree, RemotelyScrolledTreeCtrl

Proxy of C++ TreeCtrl class
Method Summary
Control __init__(self, parent, id, pos, size, style, validator, name)
Create a Control.
  __repr__(self)
TreeItemId AddRoot(self, text, image, selectedImage, data)
TreeItemId AppendItem(self, parent, text, image, selectedImage, data)
  AssignImageList(self, imageList)
  AssignStateImageList(self, imageList)
  Collapse(self, item)
  CollapseAndReset(self, item)
bool Create(self, parent, id, pos, size, style, validator, name)
Do the 2nd phase and create the GUI control.
  Delete(self, item)
  DeleteAllItems(self)
  DeleteChildren(self, item)
  EditLabel(self, item)
  EnsureVisible(self, item)
  Expand(self, item)
PyObject GetBoundingRect(self, item, textOnly)
size_t GetChildrenCount(self, item, recursively)
VisualAttributes GetClassDefaultAttributes(variant)
Get the default attributes for this class. (Static method)
size_t GetCount(self)
TextCtrl GetEditControl(self)
PyObject GetFirstChild(self, item)
TreeItemId GetFirstVisibleItem(self)
ImageList GetImageList(self)
unsigned int GetIndent(self)
Colour GetItemBackgroundColour(self, item)
TreeItemData GetItemData(self, item)
Font GetItemFont(self, item)
int GetItemImage(self, item, which)
TreeItemId GetItemParent(self, item)
PyObject GetItemPyData(self, item)
String GetItemText(self, item)
Colour GetItemTextColour(self, item)
TreeItemId GetLastChild(self, item)
PyObject GetNextChild(self, item, cookie)
TreeItemId GetNextSibling(self, item)
TreeItemId GetNextVisible(self, item)
TreeItemId GetPrevSibling(self, item)
TreeItemId GetPrevVisible(self, item)
PyObject GetPyData(self, item)
TreeItemId GetRootItem(self)
TreeItemId GetSelection(self)
PyObject GetSelections(self)
unsigned int GetSpacing(self)
ImageList GetStateImageList(self)
(item, where) HitTest(point)
Determine which item (if any) belongs the given point.
TreeItemId InsertItem(self, parent, idPrevious, text, image, selectedImage, data)
TreeItemId InsertItemBefore(self, parent, index, text, image, selectedImage, data)
bool IsBold(self, item)
bool IsExpanded(self, item)
bool IsSelected(self, item)
bool IsVisible(self, item)
bool ItemHasChildren(self, item)
TreeItemId PrependItem(self, parent, text, image, selectedImage, data)
  ScrollTo(self, item)
  SelectItem(self, item, select)
  SetImageList(self, imageList)
  SetIndent(*args, **kwargs)
SetIndent(self, unsigned int indent)
  SetItemBackgroundColour(self, item, col)
  SetItemBold(self, item, bold)
  SetItemData(self, item, data)
  SetItemDropHighlight(self, item, highlight)
  SetItemFont(self, item, font)
  SetItemHasChildren(self, item, has)
  SetItemImage(self, item, image, which)
  SetItemPyData(self, item, obj)
  SetItemText(self, item, text)
  SetItemTextColour(self, item, col)
  SetPyData(self, item, obj)
  SetSpacing(*args, **kwargs)
SetSpacing(self, unsigned int spacing)
  SetStateImageList(self, imageList)
  SortChildren(self, item)
  Toggle(self, item)
  ToggleItemSelection(self, item)
  Unselect(self)
  UnselectAll(self)
  UnselectItem(self, item)

Instance Method Details

__init__(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=TR_DEFAULT_STYLE, validator=DefaultValidator, name=TreeCtrlNameStr)
(Constructor)

Create a Control. Normally you should only call this from a subclass' __init__ as a plain old wx.Control is not very useful.
Parameters:
parent
           (type=Window)
id
           (type=int)
pos
           (type=Point)
size
           (type=Size)
style
           (type=long)
validator
           (type=Validator)
name
           (type=String)
Returns:
Control
Overrides:
wx.Control.__init__ (inherited documentation)

Create(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=TR_DEFAULT_STYLE, validator=DefaultValidator, name=TreeCtrlNameStr)

Do the 2nd phase and create the GUI control.
Parameters:
parent
           (type=Window)
id
           (type=int)
pos
           (type=Point)
size
           (type=Size)
style
           (type=long)
validator
           (type=Validator)
name
           (type=String)
Returns:
bool
Overrides:
wx.Control.Create

HitTest(point)

Determine which item (if any) belongs the given point. The coordinates specified are relative to the client area of tree ctrl and the where return value is set to a bitmask of wxTREE_HITTEST_xxx constants.
Parameters:
point
           (type=Point)
Returns:
(item, where)
Overrides:
wx.Window.HitTest

SetIndent(*args, **kwargs)

SetIndent(self, unsigned int indent)

SetSpacing(*args, **kwargs)

SetSpacing(self, unsigned int spacing)

Static Method Details

GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)

Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes.

The variant parameter is only relevant under Mac currently and is ignore under other platforms. Under Mac, it will change the size of the returned font. See wx.Window.SetWindowVariant for more about this.

Parameters:
variant
           (type=int)
Returns:
VisualAttributes

Generated by Epydoc 2.1.20040428.rpd on Tue Apr 26 14:25:49 2005 http://epydoc.sf.net