Package wx :: Package lib :: Module customtreectrl :: Class CustomTreeCtrl
[frames | no frames]

Type CustomTreeCtrl

object --+                        
         |                        
    Object --+                    
             |                    
    EvtHandler --+                
                 |                
            Window --+            
                     |            
                 Panel --+        
                         |        
            ScrolledWindow --+    
                             |    
              PyScrolledWindow --+
                                 |
                                CustomTreeCtrl


Method Summary
  __init__(self, parent, id, pos, size, style, ctstyle, validator, name)
Default class constructor.
  AcceptsFocus(self)
  AddRoot(self, text, ct_type, wnd, image, selImage, data)
Adds a root to the CustomTreeCtrl.
  AdjustMyScrollbars(self)
Adjust the wx.ScrolledWindow scrollbars.
  AppendItem(self, parentId, text, ct_type, wnd, image, selImage, data)
Appends an item as a last child of its parent.
  AssignButtonsImageList(self, imageList)
Assigns the button image list.
  AssignImageList(self, imageList)
Assigns the normal image list.
  AssignStateImageList(self, imageList)
Assigns the state image list.
  AutoCheckChild(self, item, checked)
Transverses the tree and checks/unchecks the items.
  AutoCheckParent(self, item, checked)
Traverses up the tree and checks/unchecks parent items.
  AutoToggleChild(self, item)
Transverses the tree and toggles the items.
  CalculateLevel(self, item, dc, level, y)
Calculates the level of an item.
  CalculateLineHeight(self)
Calculates the height of a line.
  CalculatePositions(self)
Calculates all the positions of the visible items.
  CalculateSize(self, item, dc)
Calculates overall position and size of an item.
  CheckChilds(self, item, checked)
Programatically check/uncheck item children.
  CheckItem(self, item, checked)
Actually checks/uncheks an item, sending (eventually) the two events EVT_TREE_ITEM_CHECKING/EVT_TREE_ITEM_CHECKED.
  CheckItem2(self, item, checked, torefresh)
Used internally to avoid EVT_TREE_ITEM_CHECKED events.
  CheckSameLevel(self, item, checked)
Uncheck radio items which are on the same level of the checked one.
  ChildrenClosing(self, item)
We are about to destroy the item children.
  Collapse(self, item)
Collapse an item, sending a EVT_TREE_ITEM_COLLAPSING and EVT_TREE_ITEM_COLLAPSED events.
  CollapseAndReset(self, item)
Collapse the given item and deletes its children.
  Delete(self, item)
Delete an item.
  DeleteAllItems(self)
Delete all items in the CustomTreeCtrl.
  DeleteChildren(self, item)
Delete item children.
  DoGetBestSize(self)
Something is better than nothing...
  DoInsertItem(self, parentId, previous, text, ct_type, wnd, image, selImage, data)
Actually inserts an item in the tree.
  DoSelectItem(self, item, unselect_others, extended_select)
Actually selects/unselects an item, sending a EVT_TREE_SEL_CHANGED event.
  DrawHorizontalGradient(self, dc, rect, hasfocus)
Gradient fill from colour 1 to colour 2 from left to right.
  DrawVerticalGradient(self, dc, rect, hasfocus)
Gradient fill from colour 1 to colour 2 from top to bottom.
  DrawVistaRectangle(self, dc, rect, hasfocus)
Draw the selected item(s) with the Windows Vista style.
  Edit(self, item)
Internal function.
  EditLabel(self, item)
Starts editing an item label.
  EnableChildren(self, item, enable)
Enables/disables item children.
  EnableItem(self, item, enable, torefresh)
Enables/disables an item.
  EnableSelectionGradient(self, enable)
Globally enables/disables drawing of gradient selection.
  EnableSelectionVista(self, enable)
Globally enables/disables drawing of Windows Vista selection.
  EnsureVisible(self, item)
Ensure that an item is visible in CustomTreeCtrl.
  Expand(self, item)
Expands an item, sending a EVT_TREE_ITEM_EXPANDING and EVT_TREE_ITEM_EXPANDED events.
  ExpandAll(self)
Expands all CustomTreeCtrl items.
  ExpandAllChildren(self, item)
Expands all the items children of the input item.
  FillArray(self, item, array)
Internal function.
  FindItem(self, idParent, prefixOrig)
Finds the first item starting with the given prefix after the given item.
  Freeze(self)
Freeze CustomTreeCtrl.
  GetBackgroundImage(self)
Returns the CustomTreeCtrl background image (can be none).
  GetBorderPen(self)
Returns the pen used to draw the selected item border.
  GetBoundingRect(self, item, textOnly)
Gets the bounding rectangle of the item.
  GetButtonsImageList(self)
Returns the buttons image list (from which application-defined button images are taken).
  GetChildrenCount(self, item, recursively)
Gets the item children count.
  GetClassDefaultAttributes(self)
Gets the class default attributes. (Class method)
  GetConnectionPen(self)
Returns the pen used to draw the connecting lines between items.
  GetCount(self)
Returns the global number of items in the tree.
  GetDisabledColour(self)
Returns the items disabled colour.
  GetEditControl(self)
Returns a pointer to the edit TextCtrl if the item is being edited or None otherwise (it is assumed that no more than one item may be edited simultaneously).
  GetFirstChild(self, item)
Gets the item first child.
  GetFirstGradientColour(self)
Returns the first gradient colour.
  GetFirstVisibleItem(self)
Returns the first visible item.
  GetGradientStyle(self)
Returns the gradient style: 0: horizontal gradient 1: vertical gradient
  GetHilightFocusColour(self)
Returns the colour used to highlight focused selected items.
  GetHilightNonFocusColour(self)
Returns the colour used to highlight unfocused selected items.
  GetHyperTextFont(self)
Returns the font used to render an hypertext item.
  GetHyperTextNewColour(self)
Returns the colour used to render a non-visited hypertext item.
  GetHyperTextVisitedColour(self)
Returns the colour used to render a visited hypertext item.
  GetImageList(self)
Returns the normal image list.
  GetImageListCheck(self)
Returns the image list used to build the check/radio buttons.
  GetIndent(self)
Returns the item indentation.
  GetItemBackgroundColour(self, item)
Returns the item background colour.
  GetItemFont(self, item)
Returns the item font.
  GetItemImage(self, item, which)
Returns the item image.
  GetItemParent(self, item)
Gets the item parent.
  GetItemPyData(self, item)
Returns the data associated to an item.
  GetItemText(self, item)
Returns the item text.
  GetItemTextColour(self, item)
Returns the item text colour.
  GetItemType(self, item)
Returns the item type: 0: normal 1: checkbox item 2: radiobutton item
  GetItemVisited(self, item)
Returns whether an hypertext item was visited.
  GetItemWindow(self, item)
Returns the window associated to the item (if any).
  GetItemWindowEnabled(self, item)
Returns whether the window associated to the item is enabled.
  GetLastChild(self, item)
Gets the item last child.
  GetLineHeight(self, item)
Returns the line height for the given item.
  GetNext(self, item)
Gets the next item.
  GetNextActiveItem(self, item, down)
Returns the next active item.
  GetNextChild(self, item, cookie)
Gets the item next child based on the 'cookie' parameter.
  GetNextSibling(self, item)
Gets the next sibling of an item.
  GetNextVisible(self, item)
Returns the next visible item.
  GetPrevSibling(self, item)
Gets the previous sibling of an item.
  GetPrevVisible(self, item)
  GetPyData(self, item)
Returns the data associated to an item.
  GetRootItem(self)
Returns the root item.
  GetSecondGradientColour(self)
Returns the second gradient colour.
  GetSelection(self)
Returns the current selection: TR_SINGLE only.
  GetSelections(self)
Returns a list of selected items.
  GetSpacing(self)
Returns the spacing between the start and the text.
  GetStateImageList(self)
Returns the state image list (from which application-defined state images are taken).
  GetTreeStyle(self)
Returns the CustomTreeCtrl style.
  HasButtons(self)
Returns whether CustomTreeCtrl has the TR_AHS_BUTTONS flag.
  HasChildren(self, item)
Returns whether an item has children or not.
  HasFlag(self, flag)
Returns whether CustomTreeCtrl has a flag.
  HideWindows(self)
Hides the windows associated to the items.
  HitTest(self, point, flags)
Calculates which (if any) item is under the given point, returning the tree item at this point plus extra information flags.
  InsertItem(self, parentId, input, text, ct_type, wnd, image, selImage, data)
Inserts an item after the given previous.
  InsertItemByIndex(self, parentId, before, text, ct_type, wnd, image, selImage, data)
Auxiliary function to cope with the C++ hideous multifunction.
  InsertItemByItem(self, parentId, idPrevious, text, ct_type, wnd, image, selImage, data)
Auxiliary function to cope with the C++ hideous multifunction.
  IsBold(self, item)
Returns whether the item font is bold or not.
  IsDescendantOf(self, parent, item)
Checks if the given item is under another one.
  IsEnabled(self, item)
Returns whether an item is enabled or disabled.
  IsExpanded(self, item)
Returns whether the item is expanded or not.
  IsItalic(self, item)
Returns whether the item font is italic or not.
  IsItemChecked(self, item)
Returns whether an item is checked or not.
  IsItemHyperText(self, item)
Returns whether an item is hypertext or not.
  IsSelected(self, item)
Returns whether the item is selected or not.
  IsVisible(self, item)
Returns whether the item is visible or not.
  ItemHasChildren(self, item)
Returns whether the item has children or not.
  OnCompareItems(self, item1, item2)
Returns whether 2 items have the same text.
  OnDestroy(self, event)
Handles the wx.EVT_WINDOW_DESTROY event.
  OnEraseBackground(self, event)
Handles the wx.EVT_ERASE_BACKGROUND event.
  OnGetToolTip(self, event)
Process the tooltip event, to speed up event processing.
  OnInternalIdle(self)
Performs operations in idle time (essentially drawing).
  OnKeyDown(self, event)
Handles the wx.EVT_CHAR event, sending a EVT_TREE_KEY_DOWN event.
  OnKillFocus(self, event)
Handles the wx.EVT_KILL_FOCUS event.
  OnMouse(self, event)
Handles a bunch of wx.EVT_MOUSE_EVENTS events.
  OnPaint(self, event)
Handles the wx.EVT_PAINT event.
  OnRenameAccept(self, item, value)
Called by TreeTextCtrl, to accept the changes and to send the EVT_TREE_END_LABEL_EDIT event.
  OnRenameCancelled(self, item)
Called by TreeTextCtrl, to cancel the changes and to send the EVT_TREE_END_LABEL_EDIT event.
  OnRenameTimer(self)
The timer for renaming has expired.
  OnSetFocus(self, event)
Handles the wx.EVT_SET_FOCUS event.
  PaintItem(self, item, dc)
Actually paint an item.
  PaintLevel(self, item, dc, level, y)
Paint a level of CustomTreeCtrl.
  PrependItem(self, parent, text, ct_type, wnd, image, selImage, data)
Appends an item as a first child of parent.
  RefreshLine(self, item)
Refreshes a damaged item line.
  RefreshSelected(self)
Refreshes a damaged selected item line.
  RefreshSelectedUnder(self, item)
Refreshes the selected items under the given item.
  RefreshSubtree(self, item)
Refreshes a damaged subtree of an item.
  ResetTextControl(self)
Called by TreeTextCtrl when it marks itself for deletion.
  ScrollTo(self, item)
Scrolls the specified item into view.
  SelectItem(self, item, select)
Selects/deselects an item.
  SelectItemRange(self, item1, item2)
Selects all the items between item1 and item2.
  SendDeleteEvent(self, item)
Actully sends the EVT_TREE_DELETE_ITEM event.
  SetBackgroundColour(self, colour)
Changes the background colour of CustomTreeCtrl.
  SetBackgroundImage(self, image)
Sets the CustomTreeCtrl background image (can be none).
  SetBorderPen(self, pen)
Sets the pen used to draw the selected item border.
  SetButtonsImageList(self, imageList)
Sets the buttons image list (from which application-defined button images are taken).
  SetConnectionPen(self, pen)
Sets the pen used to draw the connecting lines between items.
  SetDisabledColour(self, colour)
Sets the items disabled colour.
  SetFirstGradientColour(self, colour)
Sets the first gradient colour.
  SetFont(self, font)
Sets the CustomTreeCtrl font.
  SetForegroundColour(self, colour)
Changes the foreground colour of CustomTreeCtrl.
  SetGradientStyle(self, vertical)
Sets the gradient style: 0: horizontal gradient 1: vertical gradient
  SetHilightFocusColour(self, colour)
Sets the colour used to highlight focused selected items.
  SetHilightNonFocusColour(self, colour)
Sets the colour used to highlight unfocused selected items.
  SetHyperTextFont(self, font)
Sets the font used to render an hypertext item.
  SetHyperTextNewColour(self, colour)
Sets the colour used to render a non-visited hypertext item.
  SetHyperTextVisitedColour(self, colour)
Sets the colour used to render a visited hypertext item.
  SetImageList(self, imageList)
Sets the normal image list.
  SetImageListCheck(self, sizex, sizey, imglist)
Sets the check image list.
  SetIndent(self, indent)
Sets item indentation.
  SetItemBackgroundColour(self, item, col)
Sets the item background colour.
  SetItemBold(self, item, bold)
Sets the item font bold/unbold.
  SetItemDropHighlight(self, item, highlight)
Gives the item the visual feedback for drag and drop operations.
  SetItemFont(self, item, font)
Sets the item font.
  SetItemHasChildren(self, item, has)
Forces the appearance of the button next to the item.
  SetItemHyperText(self, item, hyper)
Sets whether the item is hypertext or not.
  SetItemImage(self, item, image, which)
Sets the item image, depending on the item state.
  SetItemItalic(self, item, italic)
Sets the item font italic/non-italic.
  SetItemPyData(self, item, data)
Sets the data associated to an item.
  SetItemText(self, item, text)
Sets the item text.
  SetItemTextColour(self, item, col)
Sets the item text colour.
  SetItemVisited(self, item, visited)
Sets whether an hypertext item was visited.
  SetItemWindowEnabled(self, item, enable)
Enables/disables the window associated to the item.
  SetPyData(self, item, data)
Sets the data associated to an item.
  SetSecondGradientColour(self, colour)
Sets the second gradient colour.
  SetSpacing(self, spacing)
Sets item spacing.
  SetStateImageList(self, imageList)
Sets the state image list (from which application-defined state images are taken).
  SetTreeStyle(self, styles)
Sets the CustomTreeCtrl style.
  ShouldInheritColours(self)
We don't inherit colours from anyone.
  SortChildren(self, item)
Sorts the children of the given item using OnCompareItems method of CustomTreeCtrl.
  TagAllChildrenUntilLast(self, crt_item, last_item, select)
Used internally.
  TagNextChildren(self, crt_item, last_item, select)
Used internally.
  Thaw(self)
Thaw CustomTreeCtrl.
  TileBackground(self, dc)
Tiles the background image to fill all the available area.
  Toggle(self, item)
Toggles the item state (collapsed/expanded).
  ToggleItemSelection(self, item)
Toggles the item selection.
  UnCheckRadioParent(self, item, checked)
Used internally to handle radio node parent correctly.
  Unselect(self)
Unselects the current selection.
  UnselectAll(self)
Unselect all the items.
  UnselectAllChildren(self, item)
Unselects all the children of the given item.

Property Summary

Instance Method Details

__init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=5, ctstyle=0, validator=<wx._core.Validator; proxy of <Swig Object of type 'wxVal..., name='CustomTreeCtrl')
(Constructor)

Default class constructor.

parent: parent window. Must not be none.

id: window identifier. A value of -1 indicates a default value.

pos: window position.

size: window size. If the default size (-1, -1) is specified then the window is sized appropriately.

style: the underlying wx.ScrolledWindow style + CustomTreeCtrl window style. This can be one of:

TR_NO_BUTTONS TR_HAS_BUTTONS # draw collapsed/expanded btns TR_NO_LINES # don't draw lines at all TR_LINES_AT_ROOT # connect top-level nodes TR_TWIST_BUTTONS # draw mac-like twist buttons TR_SINGLE # single selection mode TR_MULTIPLE # can select multiple items TR_EXTENDED # todo: allow extended selection TR_HAS_VARIABLE_ROW_HEIGHT # allows rows to have variable height TR_EDIT_LABELS # can edit item labels TR_ROW_LINES # put border around items TR_HIDE_ROOT # don't display root node TR_FULL_ROW_HIGHLIGHT # highlight full horizontal space TR_AUTO_CHECK_CHILD # only meaningful for checkboxes TR_AUTO_CHECK_PARENT # only meaningful for checkboxes TR_AUTO_TOGGLE_CHILD # only meaningful for checkboxes

ctstyle: kept for backward compatibility.

validator: window validator.

name: window name.

Overrides:
wx.PyScrolledWindow.__init__

AddRoot(self, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Adds a root to the CustomTreeCtrl. Only one root must exist.

AdjustMyScrollbars(self)

Adjust the wx.ScrolledWindow scrollbars.

AppendItem(self, parentId, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Appends an item as a last child of its parent.

AssignButtonsImageList(self, imageList)

Assigns the button image list.

AssignImageList(self, imageList)

Assigns the normal image list.

AssignStateImageList(self, imageList)

Assigns the state image list.

AutoCheckChild(self, item, checked)

Transverses the tree and checks/unchecks the items. Meaningful only for check items.

AutoCheckParent(self, item, checked)

Traverses up the tree and checks/unchecks parent items. Meaningful only for check items.

AutoToggleChild(self, item)

Transverses the tree and toggles the items. Meaningful only for check items.

CalculateLevel(self, item, dc, level, y)

Calculates the level of an item.

CalculateLineHeight(self)

Calculates the height of a line.

CalculatePositions(self)

Calculates all the positions of the visible items.

CalculateSize(self, item, dc)

Calculates overall position and size of an item.

CheckChilds(self, item, checked=True)

Programatically check/uncheck item children. Does not generate EVT_TREE_CHECK* events.

CheckItem(self, item, checked=True)

Actually checks/uncheks an item, sending (eventually) the two events EVT_TREE_ITEM_CHECKING/EVT_TREE_ITEM_CHECKED.

CheckItem2(self, item, checked=True, torefresh=False)

Used internally to avoid EVT_TREE_ITEM_CHECKED events.

CheckSameLevel(self, item, checked=False)

Uncheck radio items which are on the same level of the checked one. Used internally.

ChildrenClosing(self, item)

We are about to destroy the item children.

Collapse(self, item)

Collapse an item, sending a EVT_TREE_ITEM_COLLAPSING and EVT_TREE_ITEM_COLLAPSED events.

CollapseAndReset(self, item)

Collapse the given item and deletes its children.

Delete(self, item)

Delete an item.

DeleteAllItems(self)

Delete all items in the CustomTreeCtrl.

DeleteChildren(self, item)

Delete item children.

DoGetBestSize(self)

Something is better than nothing...

Overrides:
wx.PyScrolledWindow.DoGetBestSize

DoInsertItem(self, parentId, previous, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Actually inserts an item in the tree.

DoSelectItem(self, item, unselect_others=True, extended_select=False)

Actually selects/unselects an item, sending a EVT_TREE_SEL_CHANGED event.

DrawHorizontalGradient(self, dc, rect, hasfocus)

Gradient fill from colour 1 to colour 2 from left to right.

DrawVerticalGradient(self, dc, rect, hasfocus)

Gradient fill from colour 1 to colour 2 from top to bottom.

DrawVistaRectangle(self, dc, rect, hasfocus)

Draw the selected item(s) with the Windows Vista style.

Edit(self, item)

Internal function. Starts the editing of an item label, sending a EVT_TREE_BEGIN_LABEL_EDIT event.

EditLabel(self, item)

Starts editing an item label.

EnableChildren(self, item, enable=True)

Enables/disables item children. Used internally.

EnableItem(self, item, enable=True, torefresh=True)

Enables/disables an item.

EnableSelectionGradient(self, enable=True)

Globally enables/disables drawing of gradient selection.

EnableSelectionVista(self, enable=True)

Globally enables/disables drawing of Windows Vista selection.

EnsureVisible(self, item)

Ensure that an item is visible in CustomTreeCtrl.

Expand(self, item)

Expands an item, sending a EVT_TREE_ITEM_EXPANDING and EVT_TREE_ITEM_EXPANDED events.

ExpandAll(self)

Expands all CustomTreeCtrl items.

ExpandAllChildren(self, item)

Expands all the items children of the input item.

FillArray(self, item, array=[])

Internal function. Used to populate an array of selected items when the style TR_MULTIPLE is used.

FindItem(self, idParent, prefixOrig)

Finds the first item starting with the given prefix after the given item.

Freeze(self)

Freeze CustomTreeCtrl.

Overrides:
wx.Window.Freeze

GetBackgroundImage(self)

Returns the CustomTreeCtrl background image (can be none).

GetBorderPen(self)

Returns the pen used to draw the selected item border. The border pen is not used if the Windows Vista style is applied.

GetBoundingRect(self, item, textOnly=False)

Gets the bounding rectangle of the item.

GetButtonsImageList(self)

Returns the buttons image list (from which application-defined button images are taken).

GetChildrenCount(self, item, recursively=True)

Gets the item children count.

GetConnectionPen(self)

Returns the pen used to draw the connecting lines between items.

GetCount(self)

Returns the global number of items in the tree.

GetDisabledColour(self)

Returns the items disabled colour.

GetEditControl(self)

Returns a pointer to the edit TextCtrl if the item is being edited or None otherwise (it is assumed that no more than one item may be edited simultaneously).

GetFirstChild(self, item)

Gets the item first child.

GetFirstGradientColour(self)

Returns the first gradient colour.

GetFirstVisibleItem(self)

Returns the first visible item.

GetGradientStyle(self)

Returns the gradient style: 0: horizontal gradient 1: vertical gradient

GetHilightFocusColour(self)

Returns the colour used to highlight focused selected items. This is applied only if gradient and Windows Vista styles are disabled.

GetHilightNonFocusColour(self)

Returns the colour used to highlight unfocused selected items. This is applied only if gradient and Windows Vista styles are disabled.

GetHyperTextFont(self)

Returns the font used to render an hypertext item.

GetHyperTextNewColour(self)

Returns the colour used to render a non-visited hypertext item.

GetHyperTextVisitedColour(self)

Returns the colour used to render a visited hypertext item.

GetImageList(self)

Returns the normal image list.

GetImageListCheck(self)

Returns the image list used to build the check/radio buttons.

GetIndent(self)

Returns the item indentation.

GetItemBackgroundColour(self, item)

Returns the item background colour.

GetItemFont(self, item)

Returns the item font.

GetItemImage(self, item, which=0)

Returns the item image.

GetItemParent(self, item)

Gets the item parent.

GetItemPyData(self, item)

Returns the data associated to an item.

GetItemText(self, item)

Returns the item text.

GetItemTextColour(self, item)

Returns the item text colour.

GetItemType(self, item)

Returns the item type: 0: normal 1: checkbox item 2: radiobutton item

GetItemVisited(self, item)

Returns whether an hypertext item was visited.

GetItemWindow(self, item)

Returns the window associated to the item (if any).

GetItemWindowEnabled(self, item)

Returns whether the window associated to the item is enabled.

GetLastChild(self, item)

Gets the item last child.

GetLineHeight(self, item)

Returns the line height for the given item.

GetNext(self, item)

Gets the next item. Only for internal use right now.

GetNextActiveItem(self, item, down=True)

Returns the next active item. Used Internally at present.

GetNextChild(self, item, cookie)

Gets the item next child based on the 'cookie' parameter. This method has no sense if you do not call GetFirstChild() before.

GetNextSibling(self, item)

Gets the next sibling of an item.

GetNextVisible(self, item)

Returns the next visible item.

GetPrevSibling(self, item)

Gets the previous sibling of an item.

GetPyData(self, item)

Returns the data associated to an item.

GetRootItem(self)

Returns the root item.

GetSecondGradientColour(self)

Returns the second gradient colour.

GetSelection(self)

Returns the current selection: TR_SINGLE only.

GetSelections(self)

Returns a list of selected items. This can be used only if CustomTreeCtrl has the TR_MULTIPLE style set.

GetSpacing(self)

Returns the spacing between the start and the text.

GetStateImageList(self)

Returns the state image list (from which application-defined state images are taken).

GetTreeStyle(self)

Returns the CustomTreeCtrl style.

HasButtons(self)

Returns whether CustomTreeCtrl has the TR_AHS_BUTTONS flag.

HasChildren(self, item)

Returns whether an item has children or not.

HasFlag(self, flag)

Returns whether CustomTreeCtrl has a flag.

Overrides:
wx.Window.HasFlag

HideWindows(self)

Hides the windows associated to the items. Used internally.

HitTest(self, point, flags=0)

Calculates which (if any) item is under the given point, returning the tree item at this point plus extra information flags. Flags is a bitlist of the following:

TREE_HITTEST_ABOVE above the client area TREE_HITTEST_BELOW below the client area TREE_HITTEST_NOWHERE no item has been hit TREE_HITTEST_ONITEMBUTTON on the button associated to an item TREE_HITTEST_ONITEMICON on the icon associated to an item TREE_HITTEST_ONITEMCHECKICON on the check/radio icon, if present TREE_HITTEST_ONITEMINDENT on the indent associated to an item TREE_HITTEST_ONITEMLABEL on the label (string) associated to an item TREE_HITTEST_ONITEMRIGHT on the right of the label associated to an item TREE_HITTEST_TOLEFT on the left of the client area TREE_HITTEST_TORIGHT on the right of the client area TREE_HITTEST_ONITEMUPPERPART on the upper part (first half) of the item TREE_HITTEST_ONITEMLOWERPART on the lower part (second half) of the item TREE_HITTEST_ONITEM anywhere on the item

Note: both the item (if any, None otherwise) and the flag are always returned as a tuple.

Overrides:
wx.Window.HitTest

InsertItem(self, parentId, input, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Inserts an item after the given previous.

InsertItemByIndex(self, parentId, before, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Auxiliary function to cope with the C++ hideous multifunction.

InsertItemByItem(self, parentId, idPrevious, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Auxiliary function to cope with the C++ hideous multifunction.

IsBold(self, item)

Returns whether the item font is bold or not.

IsDescendantOf(self, parent, item)

Checks if the given item is under another one.

IsEnabled(self, item)

Returns whether an item is enabled or disabled.

Overrides:
wx.Window.IsEnabled

IsExpanded(self, item)

Returns whether the item is expanded or not.

IsItalic(self, item)

Returns whether the item font is italic or not.

IsItemChecked(self, item)

Returns whether an item is checked or not.

IsItemHyperText(self, item)

Returns whether an item is hypertext or not.

IsSelected(self, item)

Returns whether the item is selected or not.

IsVisible(self, item)

Returns whether the item is visible or not.

ItemHasChildren(self, item)

Returns whether the item has children or not.

OnCompareItems(self, item1, item2)

Returns whether 2 items have the same text. Override this function in the derived class to change the sort order of the items in the CustomTreeCtrl. The function should return a negative, zero or positive value if the first item is less than, equal to or greater than the second one.

The base class version compares items alphabetically.

OnDestroy(self, event)

Handles the wx.EVT_WINDOW_DESTROY event.

OnEraseBackground(self, event)

Handles the wx.EVT_ERASE_BACKGROUND event.

OnGetToolTip(self, event)

Process the tooltip event, to speed up event processing. Does not actually get a tooltip.

OnInternalIdle(self)

Performs operations in idle time (essentially drawing).

Overrides:
wx.PyScrolledWindow.OnInternalIdle

OnKeyDown(self, event)

Handles the wx.EVT_CHAR event, sending a EVT_TREE_KEY_DOWN event.

OnKillFocus(self, event)

Handles the wx.EVT_KILL_FOCUS event.

OnMouse(self, event)

Handles a bunch of wx.EVT_MOUSE_EVENTS events.

OnPaint(self, event)

Handles the wx.EVT_PAINT event.

OnRenameAccept(self, item, value)

Called by TreeTextCtrl, to accept the changes and to send the EVT_TREE_END_LABEL_EDIT event.

OnRenameCancelled(self, item)

Called by TreeTextCtrl, to cancel the changes and to send the EVT_TREE_END_LABEL_EDIT event.

OnRenameTimer(self)

The timer for renaming has expired. Start editing.

OnSetFocus(self, event)

Handles the wx.EVT_SET_FOCUS event.

PaintItem(self, item, dc)

Actually paint an item.

PaintLevel(self, item, dc, level, y)

Paint a level of CustomTreeCtrl.

PrependItem(self, parent, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

Appends an item as a first child of parent.

RefreshLine(self, item)

Refreshes a damaged item line.

RefreshSelected(self)

Refreshes a damaged selected item line.

RefreshSelectedUnder(self, item)

Refreshes the selected items under the given item.

RefreshSubtree(self, item)

Refreshes a damaged subtree of an item.

ResetTextControl(self)

Called by TreeTextCtrl when it marks itself for deletion.

ScrollTo(self, item)

Scrolls the specified item into view.

SelectItem(self, item, select=True)

Selects/deselects an item.

SelectItemRange(self, item1, item2)

Selects all the items between item1 and item2.

SendDeleteEvent(self, item)

Actully sends the EVT_TREE_DELETE_ITEM event.

SetBackgroundColour(self, colour)

Changes the background colour of CustomTreeCtrl.

Overrides:
wx.Window.SetBackgroundColour

SetBackgroundImage(self, image)

Sets the CustomTreeCtrl background image (can be none).

SetBorderPen(self, pen)

Sets the pen used to draw the selected item border. The border pen is not used if the Windows Vista style is applied.

SetButtonsImageList(self, imageList)

Sets the buttons image list (from which application-defined button images are taken).

SetConnectionPen(self, pen)

Sets the pen used to draw the connecting lines between items.

SetDisabledColour(self, colour)

Sets the items disabled colour.

SetFirstGradientColour(self, colour=None)

Sets the first gradient colour.

SetFont(self, font)

Sets the CustomTreeCtrl font.

Overrides:
wx.Window.SetFont

SetForegroundColour(self, colour)

Changes the foreground colour of CustomTreeCtrl.

Overrides:
wx.Window.SetForegroundColour

SetGradientStyle(self, vertical=0)

Sets the gradient style: 0: horizontal gradient 1: vertical gradient

SetHilightFocusColour(self, colour)

Sets the colour used to highlight focused selected items. This is applied only if gradient and Windows Vista styles are disabled.

SetHilightNonFocusColour(self, colour)

Sets the colour used to highlight unfocused selected items. This is applied only if gradient and Windows Vista styles are disabled.

SetHyperTextFont(self, font)

Sets the font used to render an hypertext item.

SetHyperTextNewColour(self, colour)

Sets the colour used to render a non-visited hypertext item.

SetHyperTextVisitedColour(self, colour)

Sets the colour used to render a visited hypertext item.

SetImageList(self, imageList)

Sets the normal image list.

SetImageListCheck(self, sizex, sizey, imglist=None)

Sets the check image list.

SetIndent(self, indent)

Sets item indentation.

SetItemBackgroundColour(self, item, col)

Sets the item background colour.

SetItemBold(self, item, bold=True)

Sets the item font bold/unbold.

SetItemDropHighlight(self, item, highlight=True)

Gives the item the visual feedback for drag and drop operations. This is useful when something is dragged from outside the CustomTreeCtrl.

SetItemFont(self, item, font)

Sets the item font.

SetItemHasChildren(self, item, has=True)

Forces the appearance of the button next to the item.

SetItemHyperText(self, item, hyper=True)

Sets whether the item is hypertext or not.

SetItemImage(self, item, image, which=0)

Sets the item image, depending on the item state.

SetItemItalic(self, item, italic=True)

Sets the item font italic/non-italic.

SetItemPyData(self, item, data)

Sets the data associated to an item.

SetItemText(self, item, text)

Sets the item text.

SetItemTextColour(self, item, col)

Sets the item text colour.

SetItemVisited(self, item, visited=True)

Sets whether an hypertext item was visited.

SetItemWindowEnabled(self, item, enable=True)

Enables/disables the window associated to the item.

SetPyData(self, item, data)

Sets the data associated to an item.

SetSecondGradientColour(self, colour=None)

Sets the second gradient colour.

SetSpacing(self, spacing)

Sets item spacing.

SetStateImageList(self, imageList)

Sets the state image list (from which application-defined state images are taken).

SetTreeStyle(self, styles)

Sets the CustomTreeCtrl style. See __init__ method for the styles explanation.

ShouldInheritColours(self)

We don't inherit colours from anyone.

Overrides:
wx.Window.ShouldInheritColours

SortChildren(self, item)

Sorts the children of the given item using OnCompareItems method of CustomTreeCtrl. You should override that method to change the sort order (the default is ascending case-sensitive alphabetical order).

TagAllChildrenUntilLast(self, crt_item, last_item, select)

Used internally.

TagNextChildren(self, crt_item, last_item, select)

Used internally.

Thaw(self)

Thaw CustomTreeCtrl.

Overrides:
wx.Window.Thaw

TileBackground(self, dc)

Tiles the background image to fill all the available area.

Toggle(self, item)

Toggles the item state (collapsed/expanded).

ToggleItemSelection(self, item)

Toggles the item selection.

UnCheckRadioParent(self, item, checked=False)

Used internally to handle radio node parent correctly.

Unselect(self)

Unselects the current selection.

UnselectAll(self)

Unselect all the items.

UnselectAllChildren(self, item)

Unselects all the children of the given item.


Class Method Details

GetClassDefaultAttributes(self)

Gets the class default attributes.


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