Hello NG,
thank you for your answers
From: news [mailto:news@sea.gmane.org] On Behalf Of Franz
Steinhaeusler
<snip>
1) So now if you press cursor down, nothing happens (I would
expect to select item0-b.
Yes, you are right. The problem is, in a normal wx.TreeCtrl, you don't have inactive items, so pressing cursor down would simply select item0-a-0. In the demo, this item is inactive (because its parent is a radiobutton non selected), so it should jump to the next active sibling. I am trying to find a way to efficiently implement some method like GetNextActiveItem() to handle that. I am working on it.
2) if you press cursor left, I would expect to close the
current branch but it jump to item0.
Right, this is the default behavior on MSW and, unless I am missing something, the C++ implementation is buggy here. I have fixed it now, thanks.
You should have the wxPython contribution award (at least for
the second quarter of 2006 beside Robin of course) for your work!
Hehehehehehe, thank you... Unfortunately, I don't think that such award exists ;-). I was in the need of having a TreeCtrl with radio and check buttons: I started by tweaking the Ricardo's CheckTreeCtrl , but I was unable to adapt it to my needs. So I started implementing this new control and, as usual when I code new things, I became an overblown coder
The Python binding can soon more than the C++ wxWidgets itself!!!
I think it already is... Not only for the contributions: Python itself is infinitely superior to C++, so coding in Python can be a joy while doing it in C++ can easily turn into a PITA... Not talking about compiling, debugging, spot the errors, recompiling... That's a nightmare
From: Michele Petrazzo [mailto:michele.petrazzo@unipex.it]
On linux (deb 3.1 + wx 2.6.x) all work except into the left
side of demo where I see the buttons cut:
Thanks for this Michele, I think I have fixed it now. Unfortunately, I can't test it because I don't have a *nix machine. If it's possible, I would like to ask you if you can please send me a screenshot of the control... The picture in that web site doesn't show the tree control itself, only the problem with the demo. I am interested in seeing the control expanded to show the attached windows. Thank you.
From: John Jackson [mailto:jjackson@pobox.com]
On the Mac, CustomTreeCtrl.py is broken at line 1822. It should beplatform, major, minor = wx.GetOsVersion()
Thanks, fixed it.
It will then run the demo. But it throws an exception:
LosOlivos:~/Downloads/CustomTreeCtrl/CustomTreeCtrl jjackson$ pythonw CTDemo.py
Traceback (most recent call last):
File "/Users/jjackson/Downloads/CustomTreeCtrl/CustomTreeCtrl/CustomTreeCtrl.py", line 4494, in OnPaint
self.PaintLevel(self._anchor, dc, 0, y)
File "/Users/jjackson/Downloads/CustomTreeCtrl/CustomTreeCtrl/CustomTreeCtrl.py", line 4321, in PaintLevel
pen = wx.Pen(((item.IsSelected() and self._hasFocus) and [self._borderPen] or [wx.TRANSPARENT])[0])
File "//Library/Python/2.3/wx-2.6-mac-ansi/wx/_gdi.py", line 322, in __init__
newobj = _gdi_.new_Pen(*args, **kwargs)
TypeError: Expected a wxColour object or a string containing a colour name or '#RRGGBB'.
Thank you, that was my misenterpretation of the C++ code. I have fixed it now.
The tree doesn't show at all on the Mac
I was expecting that, as usual. I wonder why Mac is *so* hostile versus owner-drawn controls. In every new control (as PyAUI, NotebookCtrl, and so on), the most awkward "if" switches are there just to keep Mac running. Platform independency and Apple are surely not synonyms.
and the buttons on the left don't arrange properly after scrolling.
Looks like a sizer problem for the buttons.
This seems to me a wxMac bug. Here I don't see any problem, and from the screenshot Michele posted, also on GTK everything seems to work fine for the checkboxes on the left. Sounds like you can't correctly put controls in a wx.StaticBoxSizer inside a wx.ScrolledWindow.
Shouldn't the "Themes" buttons be a radio set rather than check
buttons, as one of the themes is always active?
Mhm... Does that disturb you so much? By using radiobuttons I would end up having nested RB_GROUP radiobuttons, which I prefer to avoid.
Thanks to everyone for your comments! And please, if you can, I would appreciate to receive a screenshot of the control running on your machine . I am just curious, nothing more.
Andrea.
···
_________________________________________
Andrea Gavana (gavana@kpo.kz)
Reservoir Engineer
KPDL
4, Millbank
SW1P 3JA London
Direct Tel: +44 (0) 20 717 08936
Mobile Tel: +44 (0) 77 487 70534
Fax: +44 (0) 20 717 08900
Web: http://xoomer.virgilio.it/infinity77
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯