Package wx :: Class TreeCtrl

[frames | no frames]

## Type TreeCtrl

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

Known Subclasses:
  `FillingTree`, `InspectionTree`, `RemotelyScrolledTreeCtrl`

Proxy of C++ TreeCtrl class

Method Summary
Control | ``__init__`(self, parent, id, pos, size, style, validator, name)` Create a Control.
TreeItemId | `AddRoot(self, text, image, selectedImage, data)`
TreeItemId | `AppendItem(self, parent, text, image, selectedImage, data)`
| `AssignImageList(self, imageList)`
| `AssignStateImageList(self, imageList)`
| `Collapse(self, item)`
| `CollapseAll(self)`
| `CollapseAllChildren(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)`
| `ExpandAll(self)`
| `ExpandAllChildren(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)
unsigned int | `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)`
bool | `GetQuickBestSize(self)`
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 | `IsEmpty(self)`
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)`
| `SetQuickBestSize(self, q)`
| ``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)`

Property Summary
| `Count`: See `GetCount`
| `EditControl`: See `GetEditControl`
| `FirstVisibleItem`: See `GetFirstVisibleItem`
| `ImageList`: See `GetImageList` and `SetImageList`
| `Indent`: See `GetIndent` and `SetIndent`
| `QuickBestSize`: See `GetQuickBestSize` and `SetQuickBestSize`
| `RootItem`: See `GetRootItem`
| `Selection`: See `GetSelection`
| `Selections`: See `GetSelections`
| `Spacing`: See `GetSpacing` and `SetSpacing`
| `StateImageList`: See `GetStateImageList` and `SetStateImageList`
| `thisown`: The membership flag

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

Property Details

### Count

See `GetCount`

  Get Method:
    `GetCount`(self)

### EditControl

See `GetEditControl`

  Get Method:
    `GetEditControl`(self)

### FirstVisibleItem

See `GetFirstVisibleItem`

  Get Method:
    `GetFirstVisibleItem`(self)

### ImageList

See `GetImageList` and `SetImageList`

  Get Method:
    `GetImageList`(self)
  Set Method:
    `SetImageList`(self, imageList)

### Indent

See `GetIndent` and `SetIndent`

  Get Method:
    `GetIndent`(self)
  Set Method:
    `SetIndent`(*args, **kwargs)

### QuickBestSize

See `GetQuickBestSize` and `SetQuickBestSize`

  Get Method:
    `GetQuickBestSize`(self)
  Set Method:
    `SetQuickBestSize`(self, q)

### RootItem

See `GetRootItem`

  Get Method:
    `GetRootItem`(self)

### Selection

See `GetSelection`

  Get Method:
    `GetSelection`(self)

### Selections

See `GetSelections`

  Get Method:
    `GetSelections`(self)

### Spacing

See `GetSpacing` and `SetSpacing`

  Get Method:
    `GetSpacing`(self)
  Set Method:
    `SetSpacing`(*args, **kwargs)

### StateImageList

See `GetStateImageList` and `SetStateImageList`

  Get Method:
    `GetStateImageList`(self)
  Set Method:
    `SetStateImageList`(self, imageList)

### thisown

The membership flag

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:08:08 2007 | http://epydoc.sf.net