taskbar icon screen position

3 views
Skip to first unread message

Radek Svarz

unread,
Apr 13, 2007, 4:06:00 AM4/13/07
to wxPytho...@lists.wxwidgets.org
Hi,

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

Radek Svarz

unread,
Apr 15, 2007, 1:55:36 PM4/15/07
to wxPytho...@lists.wxwidgets.org
> Probably the closest you could get is to use wx.GetMouseState. It won't
> tell you the mouse position at the time of the event, but rather at the
> time of the call to the function, but that should normally be close enough.

thanks, this did the trick. Radek

On 4/13/07, Robin Dunn <ro...@alldunn.com> wrote:

> Probably the closest you could get is to use wx.GetMouseState. It won't
> tell you the mouse position at the time of the event, but rather at the
> time of the call to the function, but that should normally be close enough.
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org Java give you jitters? Relax with wxPython!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-user...@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-...@lists.wxwidgets.org
>
>

Reply all
Reply to author
Forward
0 new messages