[wxPython-users] ANN: HyperTreeList Control for wxPython :-D

Stani's Python Editor spe.stani.be at gmail.com
Tue May 8 16:33:30 PDT 2007


Hi Andrea!
Happy birthday!
Unfortunately something went wrong with unwrapping your present on 
Ubuntu 7.04. wxPen doesn't seem supported by GTK, as you suggested in 
your comment:

$ python '/home/stani/Desktop/HyperTreeList.zip_FILES/HyperTreeListDemo.py'
Traceback (most recent call last):
  File 
"/home/stani/Desktop/HyperTreeList.zip_FILES/HyperTreeListDemo.py", line 
2338, in <module>
    main()
  File 
"/home/stani/Desktop/HyperTreeList.zip_FILES/HyperTreeListDemo.py", line 
2332, in main
    frame = HyperTreeListDemo(None, -1, "HyperTreeList wxPython Demo ;-)")
  File 
"/home/stani/Desktop/HyperTreeList.zip_FILES/HyperTreeListDemo.py", line 
896, in __init__
    self.tree = HyperTreeList(panel, -1, log=self.log)
  File 
"/home/stani/Desktop/HyperTreeList.zip_FILES/HyperTreeListDemo.py", line 
1557, in __init__
    HTL.HyperTreeList.__init__(self, parent, id, pos, size, style)
  File "/home/stani/Desktop/HyperTreeList.zip_FILES/HyperTreeList.py", 
line 6127, in __init__
    self._main_win = TreeListMainWindow(self, -1, wx.Point(0, 0), size, 
main_style, validator)
  File "/home/stani/Desktop/HyperTreeList.zip_FILES/HyperTreeList.py", 
line 2370, in __init__
    self._dottedPen = wxPen("grey", 0, 0) # Bitmap based pen is not 
supported by GTK!
NameError: global name 'wxPen' is not defined

Stani

Andrea Gavana wrote:
> Hi All,
>
>    to celebrate my birthday ( :-D ), I am happy to announce my latest
> child, HyperTreeList.
>
> HyperTreeList is a class that mimics the behaviour of
> wx.gizmos.TreeListCtrl, with almost the same base functionalities plus
> some more enhancements. This class does not rely on the native
> control, as it is a full owner-drawn tree-list control.
>
> HyperTreeList is somewhat an hybrid between CustomTreeCtrl and
> wx.gizmos.TreeListCtrl.
>
> In addition to the standard wx.gizmos.TreeListCtrl behaviour, this
> class supports:
>
> * CheckBox-type items: checkboxes are easy to handle, just selected or
>  unselected state with no particular issues in handling the item's 
> children;
>
> * RadioButton-type items: since I elected to put radiobuttons in
> HyperTreeList, I
>  needed some way to handle them, that made sense. So, I used the 
> following
>  approach:
>     - All peer-nodes that are radiobuttons will be mutually
> exclusive. In other words,
>       only one of a set of radiobuttons that share a common parent
> can be checked
>       at once. If a radiobutton node becomes checked, then all of its 
> peer
>       radiobuttons must be unchecked;
>     - If a radiobutton node becomes unchecked, then all of its child
> nodes will
>       become inactive.
>
> * Hyperlink-type items: they look like an hyperlink, with the proper
> mouse cursor on
>  hovering.
>
> * Multiline text items.
>
> * Enabling/disabling items (together with their plain or grayed out 
> icons).
>
> * Whatever non-toplevel widget can be attached next to a tree item.
>
> * Whatever non-toplevel widget can be attached next to a list item.
>
> * Column headers are fully customizable in terms of icons, colour,
> font, alignment etc...
>
> * Default selection style, gradient (horizontal/vertical) selection
> style and Windows
>  Vista selection style.
>
> * Customized drag and drop images built on the fly.
>
> * Setting the HyperTreeList item buttons to a personalized imagelist.
>
> * Setting the HyperTreeList check/radio item icons to a personalized 
> imagelist.
>
> * Changing the style of the lines that connect the items (in terms of
> wx.Pen styles).
>
> * Using an image as a HyperTreeList background (currently only in 
> "tile" mode).
>
> And a lot more. Check the demo for an almost complete review of the
> functionalities.
>
> The demo by itself is *very* huge, as I wanted to show the basic
> functionalities and the new ones, as completely as possible (even if
> the demo does not show all the possibilities). In the demo, you can
> use the options on the left wx.ScrolledWindow and the right mouse
> button on the HyperTreeList to activate other methods.
>
> I appreciate any comment, suggestion, idea and bug report (patches are
> far more welcomed :-) ). Noting that the code by itself is quite huge,
> it is highly possible that some bug is loudly laughing at me and I
> didn't spot it.
>
> I tested the code on Windows XP, Python 2.5 and wxPython 2.8.3/2.8.4
> pre-release. It should work also with older version of wxPython, but I
> am not sure. I have no idea of its behavior on GTK and Mac, though I
> am expecting (as usual) a gazillion of problems on that amazing
> platform that is Mac. If someone is able to run it on other platforms
> than Windows, I would like to ask him/her if he/she can please send me
> some screenshots of it.
>
> Note: the docs are still incomplete, but I will finish them as soon as
> I fix the major bugs that some kind volunteers will find in my code.
>
> You can find the source, the demo and some screenshots in the usual 
> place:
>
> http://xoomer.alice.it/infinity77/eng/freeware.html#hypertreelist
>
> wxPython rules :-D
>
> Andrea.
>
> "Imagination Is The Only Weapon In The War Against Reality."
> http://xoomer.virgilio.it/infinity77/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>





More information about the wxpython-users mailing list