How to compute screen position of a ListCtrl row or item

I have written a nice Windows (and Mac) app to handle google bookmarks. It
uses a listctrl (in report view) to display bookmarks.
I have bound an wx.EVT_CONTEXT_MENU event to the list, which gets control
for both a right mouse click or a Windows context menu key. (Very nice,
thanks!) The event handler wants to raise a popup menu at the correct screen
location,
which is easy if triggered by right mouse, much harder if by keypush.

I am crudely computing a screen position by differencing GetFocusedItem and
GetTopItem which yields a relative row number from the top of the window,
followed by hack code which attempts to multiply this by the height of a
single row. But wxListCtrl just does not seem to have the capability to
return this value.

I have looked at GetItemSpacing which is not effective (does not change with
different font sizes).
Does anyone have a solution?

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/How-to-compute-screen-position-of-a-ListCtrl-row-or-item-tp5720289.html
Sent from the wxPython-users mailing list archive at Nabble.com.

GetItemRect is what I want, it gives me exactly what I need.
I was looking at the doc for ListCtrl and was confused by missing
documentation.

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/How-to-compute-screen-position-of-a-ListCtrl-row-or-item-tp5720289p5720365.html
Sent from the wxPython-users mailing list archive at Nabble.com.