wxTreeListCtrl

Christian Kristukat wrote:

Robin Dunn wrote:

Christian Kristukat wrote:

Hi.
I switched from a TreeCtrl to a TreeListCtrl and I do not any longer recieve any events like wx.EVT_RIGHT_DOWN from the widget. Is this a bug? I'm using wxPython-2.4.2.4 for python 2.3 on linux.

The TreeListCtrl is composed of two subwindows. Try binding your events to treelist.GetMainWindow().

That works, thanks. Now there's another problem. The HitTest function returns the wrong item. If you use this value to select the item via SelectItem, the item just above the hit item gets selected. I tried that again with a TreeCtrl and there it worked as it should.

The mouse position you get from the event is relative to the "main" window, not the whole TreeListCtrl, so you need to adjust it. There was some code posted to this list a few months ago showing one way to do it, maybe you can find it in the archives.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!