views:

78

answers:

2

Screenshot

I'm looking to recreate this in Python; I can't find a library that seems to have what I need. Are there any GUI libraries that might possibly have this? - I have scoured wxWidgets (which is my preferred gui library) but they have nothing similar.

I have a script already that uses a standard wxTreeCtrl but it has no provisions for adding additional icons at the tail end like this screen shot.

If no pre-existing gui library exists, any tips for my first steps in trying to create it myself?

+1  A: 

you have few options

  1. use wx.lib.customtreectrl.CustomTreeCtrl
    AppendItem of CustomTreeCtrl can take any wx widget, which is shown at end, so you can use that to affect e.g. tree.AppendItem(root, "item1", wnd=yourImageControl)

  2. use wx.gizmos.TreeListCtrl
    you can have icons in separate columns and tree in first column

  3. You can use wx.lib.mvctree , and supply your own Painter class or derive class from TreePainter, and override Paint method

  4. Or most complex but most satisfying way is to write your own tree control, and if you have long term usage for such a control and you may need more custom changed, it will be best way and won't be much difficult. See mvtree for inspiration or customize that.

Anurag Uniyal
A: 

Instead of CustomTreeCtrl, I'd look into HyperTreeList. It is based on CustomTreeCtrl, but adds support for multiple columns. I'm not sure if it supports multiple icons in one column out of the box though.

Frank Niessink