I am using wx.TaskBarIcon on Windows and need to get the screen
position of the icon in systray in order to create the frame near it.
I was hoping to get it like this (in MyTaskBarIcon class):
self.Bind(wx.EVT_TASKBAR_LEFT_UP, self.OnTaskBarShow)
def OnTaskBarShow(self, evt):
screenpos = evt.GetPosition()
print screenpos
But it throws an error.
Any ideas?
Thanks,
Radek
R> I am using wx.TaskBarIcon on Windows and need to get the screen
R> position of the icon in systray in order to create the frame near it.
R> I was hoping to get it like this (in MyTaskBarIcon class):
R>
R> self.Bind(wx.EVT_TASKBAR_LEFT_UP, self.OnTaskBarShow)
R> def OnTaskBarShow(self, evt):
R> screenpos = evt.GetPosition()
R> print screenpos
R>
R> But it throws an error.
R>
R> Any ideas?
This is currently not implemented, i.e. there is no position in
wxTaskBarIconEvent. It could be added relatively easily for Windows, I
think, but I don't know how to do it for the other platforms -- if anybody
does, please let us know (or consider contributing patches for it, of
course).
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
For additional commands, e-mail: wx-use...@lists.wxwidgets.org
Finally I used wx.GetMouseState in order to get the mouse position. It
is not that precise, but close enough.
What would be approach for Windows?
Radek