2.5.2.7 wrong item in treelistctrl

Hi List,

In the new version, the item returned by the following statement is wrong.

self.item, flags, cols = self.StatusTree.HitTest(self.StatusTree.ScreenToClient(self.StatusTree.GetMainWindow().ClientToScreen(pt)))

where self.StatusTree a wxTreeListCtrl is. In the past I have been fighting with this (as regular visitors of this list will remember), and the above line works fine for 2.4.2.4.

Cheers, keep up the good work.

Dick

dick wrote:

Hi List,

In the new version, the item returned by the following statement is wrong.

self.item, flags, cols = self.StatusTree.HitTest(self.StatusTree.ScreenToClient(self.StatusTree.GetMainWindow().ClientToScreen(pt)))

where self.StatusTree a wxTreeListCtrl is. In the past I have been fighting with this (as regular visitors of this list will remember), and the above line works fine for 2.4.2.4.

Looks to me like the code in 2.5 expects the position passed to HitTest to be relative to the GetMainWindow(), not the tree ctrl window. There is a sample in the demo that shows using HitTest.

ยทยทยท

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