Module CustomTreeCtrl :: Class CustomTreeCtrl
[hide private]
[frames] | no frames]

Class CustomTreeCtrl
source code

     object --+                    
              |                    
         Object --+                
                  |                
         EvtHandler --+            
                      |            
           _core.Window --+        
                          |        
                      Panel --+    
                              |    
     wx._windows.ScrolledWindow --+
                                  |
                                 CustomTreeCtrl

Instance Methods [hide private]
  AddRoot(self, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)
Adds a root to the CustomTreeCtrl.
  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.
  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=True)
Programatically check/uncheck item children.
  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.
  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=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.
  EditLabel(self, item)
Starts editing an item label.
  EnableChildren(self, item, enable=True)
Enables/disables item children.
  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, item)
Expands all the items.
  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=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.
  GetClassDefaultAttributes(self)
Gets the class default attributes.
  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=True)
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=0)
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=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.
  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, event)
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=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.
  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=None)
Sets the first gradient colour.
  SetFont(self, font)
Sets the CustomTreeCtrl font.
  SetForegroundColour(self, colour)
Changes the foreground colour of CustomTreeCtrl.
  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.
  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=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.
  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.
  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=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.
  __init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=0, ctstyle=9, validator=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), name='CustomTreeCtrl')
Default class constructor.

Inherited from wx._windows.ScrolledWindow: AdjustScrollbars, CalcScrollInc, CalcScrolledPosition, CalcUnscrolledPosition, Create, DoPrepareDC, EnableScrolling, GetScaleX, GetScaleY, GetScrollPageSize, GetScrollPixelsPerUnit, GetTargetRect, GetTargetWindow, GetViewStart, Scroll, SetScale, SetScrollPageSize, SetScrollRate, SetScrollbars, SetTargetRect, SetTargetWindow, __repr__

Inherited from wx._windows.Panel: InitDialog, SetFocus, SetFocusIgnoringChildren

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AssociateHandle, CacheBestSize, CaptureMouse, Center, CenterOnParent, CenterOnScreen, Centre, CentreOnParent, CentreOnScreen, ClearBackground, ClientToScreen, ClientToScreenXY, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByName, Fit, FitInside, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDefaultItem, GetDropTarget, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetHandle, GetHelpText, GetId, GetLabel, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetTitle, GetToolTip, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasScrollbar, HasTransparentBackground, Hide, HitTestXY, InheritAttributes, InheritsBackgroundColour, InvalidateBestSize, IsBeingDeleted, IsExposed, IsExposedPoint, IsExposedRect, IsRetained, IsShown, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendSizeEvent, SetAcceleratorTable, SetAutoLayout, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDefaultItem, SetDimensions, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocusFromKbd, SetHelpText, SetHelpTextForId, SetId, SetLabel, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetTitle, SetTmpDefaultItem, SetToolTip, SetToolTipString, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, Show, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__


Static Methods [hide private]

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId


Class Variables [hide private]

Inherited from object: __class__


Method Details [hide private]

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

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

AdjustMyScrollbars(self)

source code 
Adjust the wx.ScrolledWindow scrollbars.

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

source code 
Appends an item as a last child of its parent.

AssignButtonsImageList(self, imageList)

source code 
Assigns the button image list.

AssignImageList(self, imageList)

source code 
Assigns the normal image list.

AssignStateImageList(self, imageList)

source code 
Assigns the state image list.

AutoCheckChild(self, item, checked)

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

AutoToggleChild(self, item)

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

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

source code 
Calculates the level of an item.

CalculateLineHeight(self)

source code 
Calculates the height of a line.

CalculatePositions(self)

source code 
Calculates all the positions of the visible items.

CalculateSize(self, item, dc)

source code 
Calculates overall position and size of an item.

CheckChilds(self, item, checked=True)

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

CheckItem(self, item, checked=True)

source code 
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)

source code 
Used internally to avoid EVT_TREE_ITEM_CHECKED events.

CheckSameLevel(self, item, checked=False)

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

ChildrenClosing(self, item)

source code 
We are about to destroy the item children.

Collapse(self, item)

source code 
Collapse an item, sending a EVT_TREE_ITEM_COLLAPSING and EVT_TREE_ITEM_COLLAPSED events.

CollapseAndReset(self, item)

source code 
Collapse the given item and deletes its children.

Delete(self, item)

source code 
Delete an item.

DeleteAllItems(self)

source code 
Delete all items in the CustomTreeCtrl.

DeleteChildren(self, item)

source code 
Delete item children.

DoGetBestSize(self)

source code 
Something is better than nothing...

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

source code 
Actually inserts an item in the tree.

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

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

DrawHorizontalGradient(self, dc, rect, hasfocus)

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

DrawVerticalGradient(self, dc, rect, hasfocus)

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

DrawVistaRectangle(self, dc, rect, hasfocus)

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

Edit(self, item)

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

EditLabel(self, item)

source code 
Starts editing an item label.

EnableChildren(self, item, enable=True)

source code 
Enables/disables item children. Used internally.

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

source code 
Enables/disables an item.

EnableSelectionGradient(self, enable=True)

source code 
Globally enables/disables drawing of gradient selection.

EnableSelectionVista(self, enable=True)

source code 
Globally enables/disables drawing of Windows Vista selection.

EnsureVisible(self, item)

source code 
Ensure that an item is visible in CustomTreeCtrl.

Expand(self, item)

source code 
Expands an item, sending a EVT_TREE_ITEM_EXPANDING and EVT_TREE_ITEM_EXPANDED events.

ExpandAll(self, item)

source code 
Expands all the items.

FillArray(self, item, array=[])

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

FindItem(self, idParent, prefixOrig)

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

Freeze(self)

source code 
Freeze CustomTreeCtrl.
Overrides: wx._core.Window.Freeze

GetBackgroundImage(self)

source code 
Returns the CustomTreeCtrl background image (can be none).

GetBorderPen(self)

source code 
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)

source code 
Gets the bounding rectangle of the item.

GetButtonsImageList(self)

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

GetChildrenCount(self, item, recursively=True)

source code 
Gets the item children count.

GetClassDefaultAttributes(self)

source code 
Gets the class default attributes.
Overrides: wx._windows.ScrolledWindow.GetClassDefaultAttributes

GetConnectionPen(self)

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

GetCount(self)

source code 
Returns the global number of items in the tree.

GetDisabledColour(self)

source code 
Returns the items disabled colour.

GetEditControl(self)

source code 
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)

source code 
Gets the item first child.

GetFirstGradientColour(self)

source code 
Returns the first gradient colour.

GetFirstVisibleItem(self)

source code 
Returns the first visible item.

GetGradientStyle(self)

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

GetHilightFocusColour(self)

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

GetHilightNonFocusColour(self)

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

GetHyperTextFont(self)

source code 
Returns the font used to render an hypertext item.

GetHyperTextNewColour(self)

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

GetHyperTextVisitedColour(self)

source code 
Returns the colour used to render a visited hypertext item.

GetImageList(self)

source code 
Returns the normal image list.

GetImageListCheck(self)

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

GetIndent(self)

source code 
Returns the item indentation.

GetItemBackgroundColour(self, item)

source code 
Returns the item background colour.

GetItemFont(self, item)

source code 
Returns the item font.

GetItemImage(self, item, which)

source code 
Returns the item image.

GetItemParent(self, item)

source code 
Gets the item parent.

GetItemPyData(self, item)

source code 
Returns the data associated to an item.

GetItemText(self, item)

source code 
Returns the item text.

GetItemTextColour(self, item)

source code 
Returns the item text colour.

GetItemType(self, item)

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

GetItemVisited(self, item)

source code 
Returns whether an hypertext item was visited.

GetItemWindow(self, item)

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

GetItemWindowEnabled(self, item)

source code 
Returns whether the window associated to the item is enabled.

GetLastChild(self, item)

source code 
Gets the item last child.

GetLineHeight(self, item)

source code 
Returns the line height for the given item.

GetNext(self, item)

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

GetNextActiveItem(self, item, down=True)

source code 
Returns the next active item. Used Internally at present.

GetNextChild(self, item, cookie)

source code 
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)

source code 
Gets the next sibling of an item.

GetNextVisible(self, item)

source code 
Returns the next visible item.

GetPrevSibling(self, item)

source code 
Gets the previous sibling of an item.

GetPrevVisible(self, item)

source code 

GetPyData(self, item)

source code 
Returns the data associated to an item.

GetRootItem(self)

source code 
Returns the root item.

GetSecondGradientColour(self)

source code 
Returns the second gradient colour.

GetSelection(self)

source code 
Returns the current selection: TR_SINGLE only.

GetSelections(self)

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

GetSpacing(self)

source code 
Returns the spacing between the start and the text.

GetStateImageList(self)

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

GetTreeStyle(self)

source code 
Returns the CustomTreeCtrl style.

HasButtons(self)

source code 
Returns whether CustomTreeCtrl has the TR_AHS_BUTTONS flag.

HasChildren(self, item)

source code 
Returns whether an item has children or not.

HasFlag(self, flag)

source code 
Returns whether CustomTreeCtrl has a flag.
Overrides: wx._core.Window.HasFlag

HideWindows(self)

source code 
Hides the windows associated to the items. Used internally.

HitTest(self, point, flags=0)

source code 

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._core.Window.HitTest

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

source code 
Inserts an item after the given previous.

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

source code 
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)

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

IsBold(self, item)

source code 
Returns whether the item font is bold or not.

IsDescendantOf(self, parent, item)

source code 
Checks if the given item is under another one.

IsEnabled(self, item)

source code 
Returns whether an item is enabled or disabled.
Returns:
bool

Overrides: wx._core.Window.IsEnabled

IsExpanded(self, item)

source code 
Returns whether the item is expanded or not.

IsItalic(self, item)

source code 
Returns whether the item font is italic or not.

IsItemChecked(self, item)

source code 
Returns whether an item is checked or not.

IsItemHyperText(self, item)

source code 
Returns whether an item is hypertext or not.

IsSelected(self, item)

source code 
Returns whether the item is selected or not.

IsVisible(self, item)

source code 
Returns whether the item is visible or not.

ItemHasChildren(self, item)

source code 
Returns whether the item has children or not.

OnCompareItems(self, item1, item2)

source code 

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)

source code 
Handles the wx.EVT_WINDOW_DESTROY event.

OnEraseBackground(self, event)

source code 
Handles the wx.EVT_ERASE_BACKGROUND event.

OnGetToolTip(self, event)

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

OnInternalIdle(self, event)

source code 
Performs operations in idle time (essentially drawing).

OnKeyDown(self, event)

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

OnKillFocus(self, event)

source code 
Handles the wx.EVT_KILL_FOCUS event.

OnMouse(self, event)

source code 
Handles a bunch of wx.EVT_MOUSE_EVENTS events.

OnPaint(self, event)

source code 
Handles the wx.EVT_PAINT event.
Overrides: wx._core.Window.OnPaint

OnRenameAccept(self, item, value)

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

OnRenameCancelled(self, item)

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

OnRenameTimer(self)

source code 
The timer for renaming has expired. Start editing.

OnSetFocus(self, event)

source code 
Handles the wx.EVT_SET_FOCUS event.

PaintItem(self, item, dc)

source code 
Actually paint an item.

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

source code 
Paint a level of CustomTreeCtrl.

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

source code 
Appends an item as a first child of parent.

RefreshLine(self, item)

source code 
Refreshes a damaged item line.

RefreshSelected(self)

source code 
Refreshes a damaged selected item line.

RefreshSelectedUnder(self, item)

source code 
Refreshes the selected items under the given item.

RefreshSubtree(self, item)

source code 
Refreshes a damaged subtree of an item.

ResetTextControl(self)

source code 
Called by TreeTextCtrl when it marks itself for deletion.

ScrollTo(self, item)

source code 
Scrolls the specified item into view.

SelectItem(self, item, select=True)

source code 
Selects/deselects an item.

SelectItemRange(self, item1, item2)

source code 
Selects all the items between item1 and item2.

SendDeleteEvent(self, item)

source code 
Actully sends the EVT_TREE_DELETE_ITEM event.

SetBackgroundColour(self, colour)

source code 
Changes the background colour of CustomTreeCtrl.
Overrides: wx._core.Window.SetBackgroundColour

SetBackgroundImage(self, image)

source code 
Sets the CustomTreeCtrl background image (can be none).

SetBorderPen(self, pen)

source code 
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)

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

SetConnectionPen(self, pen)

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

SetDisabledColour(self, colour)

source code 
Sets the items disabled colour.

SetFirstGradientColour(self, colour=None)

source code 
Sets the first gradient colour.

SetFont(self, font)

source code 
Sets the CustomTreeCtrl font.
Overrides: wx._core.Window.SetFont

SetForegroundColour(self, colour)

source code 
Changes the foreground colour of CustomTreeCtrl.
Overrides: wx._core.Window.SetForegroundColour

SetGradientStyle(self, vertical=0)

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

SetHilightFocusColour(self, colour)

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

SetHilightNonFocusColour(self, colour)

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

SetHyperTextFont(self, font)

source code 
Sets the font used to render an hypertext item.

SetHyperTextNewColour(self, colour)

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

SetHyperTextVisitedColour(self, colour)

source code 
Sets the colour used to render a visited hypertext item.

SetImageList(self, imageList)

source code 
Sets the normal image list.

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

source code 
Sets the check image list.

SetIndent(self, indent)

source code 
Sets item indentation.

SetItemBackgroundColour(self, item, col)

source code 
Sets the item background colour.

SetItemBold(self, item, bold=True)

source code 
Sets the item font bold/unbold.

SetItemDropHighlight(self, item, highlight=True)

source code 
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)

source code 
Sets the item font.

SetItemHasChildren(self, item, has=True)

source code 
Forces the appearance of the button next to the item.

SetItemHyperText(self, item, hyper=True)

source code 
Sets whether the item is hypertext or not.

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

source code 
Sets the item image, depending on the item state.

SetItemItalic(self, item, italic=True)

source code 
Sets the item font italic/non-italic.

SetItemPyData(self, item, data)

source code 
Sets the data associated to an item.

SetItemText(self, item, text)

source code 
Sets the item text.

SetItemTextColour(self, item, col)

source code 
Sets the item text colour.

SetItemVisited(self, item, visited=True)

source code 
Sets whether an hypertext item was visited.

SetItemWindowEnabled(self, item, enable=True)

source code 
Enables/disables the window associated to the item.

SetPyData(self, item, data)

source code 
Sets the data associated to an item.

SetSecondGradientColour(self, colour=None)

source code 
Sets the second gradient colour.

SetSpacing(self, spacing)

source code 
Sets item spacing.

SetStateImageList(self, imageList)

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

SetTreeStyle(self, styles)

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

ShouldInheritColours(self)

source code 
We don't inherit colours from anyone.
Returns:
bool

Overrides: wx._core.Window.ShouldInheritColours

SortChildren(self, item)

source code 
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)

source code 
Used internally.

TagNextChildren(self, crt_item, last_item, select)

source code 
Used internally.

Thaw(self)

source code 
Thaw CustomTreeCtrl.
Overrides: wx._core.Window.Thaw

TileBackground(self, dc)

source code 
Tiles the background image to fill all the available area.

Toggle(self, item)

source code 
Toggles the item state (collapsed/expanded).

ToggleItemSelection(self, item)

source code 
Toggles the item selection.

UnCheckRadioParent(self, item, checked=False)

source code 
Used internally to handle radio node parent correctly.

Unselect(self)

source code 
Unselects the current selection.

UnselectAll(self)

source code 
Unselect all the items.

UnselectAllChildren(self, item)

source code 
Unselects all the children of the given item.

__init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=0, ctstyle=9, validator=wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.), name='CustomTreeCtrl')
(Constructor)

source code 

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

ctstyle: 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_TOGGLE_CHILD                    # only meaningful for checkboxes

validator: window validator.

name: window name.

Overrides: wx._windows.ScrolledWindow.__init__