Discussion:
wx.TaskBarIcon.CreatePopupMenu doesn't appear to be getting called on wxPython3
Paul Wiseman
2014-09-12 15:02:23 UTC
Permalink
Hey,

I've just been checking out wxPython 3 (3.0.1.1) There's a lot of
really nice improvements since I last looked!

I've been considering switching an older app written with 2.8.12.1 and
noticed that the menu on the TaskBarIcon wasn't appearing (running
3.0.1.1 on OSX 10.9)

I've attached a small example which works under 2.8.12.1. When right
clicking the dock icon there's nothing printed out which looks like
the method isn't being called.

Is anyone else seeing this? maybe other platforms too?

Paul
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan McCorkle
2014-09-12 18:26:38 UTC
Permalink
Have you tried this demo?
http://www.blog.pythonlibrary.org/2011/12/13/wxpython-101-creating-taskbar-icons/
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Paul Wiseman
2014-09-12 22:57:25 UTC
Permalink
No, but that's just a more detailed example to the one I posted I think

I realised what it was though - the menu has moved in wx3 from the
dock to the menu bar under OSX which is an awesome change! I didn't
know this was possible under wx so that's good news! Out of curiosity
is there still a way to add menu items to the dock context menu?
Post by Nathan McCorkle
Have you tried this demo?
http://www.blog.pythonlibrary.org/2011/12/13/wxpython-101-creating-taskbar-icons/
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan McCorkle
2014-09-15 19:35:31 UTC
Permalink
Post by Paul Wiseman
No, but that's just a more detailed example to the one I posted I think
Your code didn't work for me as-it-was without some modifications provided
to me with insight from the demo I posted. I'm on Windows 7 and tried
wxPython 2.9.4 and 3.0.1
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robin Dunn
2014-09-24 01:05:09 UTC
Permalink
This post might be inappropriate. Click to display it.
Paul Wiseman
2014-10-15 11:05:35 UTC
Permalink
Awesome, thanks for this.

Also I was curious to know - do the menus have to be a wx.Menu or is
it possible to create a custom drawn/look & feel menu for the
taskbaricon? (TBI_CUSTOM_STATUS_ITEM on mac)
Post by Paul Wiseman
No, but that's just a more detailed example to the one I posted I think
I realised what it was though - the menu has moved in wx3 from the
dock to the menu bar under OSX which is an awesome change! I didn't
know this was possible under wx so that's good news! Out of curiosity
is there still a way to add menu items to the dock context menu?
Yes, there is an optional style flag that can be passed to wx.TaskBarIcon to
control which type it is. This only has an effect on OSX, on the other
platforms it is ignored.
enum wxTaskBarIconType
{
wxTBI_DOCK,
wxTBI_CUSTOM_STATUSITEM,
wxTBI_DEFAULT_TYPE = wxTBI_CUSTOM_STATUSITEM
};
--
Robin Dunn
Software Craftsman
http://wxPython.org
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...