ObjectListView doubleclick failure

I’ve been using OLV for a long time and recently switched to Python 3.10 and wxPython Phoenix (4.1.1 gtk3 (phoenix) wxWidgets 3.2.0). Unfortunately double clicking on a list item has stopped working. The failure occurs without an error, but I’ve traced the issue to the fact that the wx.EVT_LEFT_DCLICK is not being captured, only wx.EVT_LEFT_UP. I tried substituting wx.EVT_LIST_ITEM_ACTIVATED but that also fails without an error message. Is there an alternative way of naming a double click event that I don’t know about?

As always, any help is appreciated. Thanks.

Mike Barron

Hi Mike,

This ancient hack/workaround from @driscollis at StackOverflow gave me a hint.

Try to handle EVT_LEFT_DOWN and immediately afterwards handle EVT_LEFT_UP while checking the mouse position in both handlers. Then, verify that positions are equal or at least within a location margin (that you could set). You might also set a timer at left down and catch it within reasonable range in left up.

Cheers

Thom:

Thanks for your help. I worked on this for a couple weeks and ultimately decided I should have been using wx.Grid instead of a list. I converted the OLV controls over to grids and everything is working nicely as one would expect from code that is being actively maintained.

Mike