Where is wx.TaskBarIcon?

Hi guys,

I’m back to developing in wxPython after a long hiatus :slight_smile:

Very excited about Phoenix being available. I installed it on my Python 3.4 and it was able to run a simple wxPython program. Woohoo!

Now I’m trying to convert one of my programs to Python 3.4 and Phoenix. I ran into the following problem: I get an AttributeError when trying to use wx.TaskBarIcon. It looks like TaskBarIcon isn’t even defined in wx.

Could this be? Is this just a part that isn’t ready yet? Or maybe it was renamed or moved? Please advise.

Thanks,

Ram.

Cool, works!

Now another thing I can’t find: wx.IconFromBitmap

Any idea where it is?

Thanks,

Ram.

···

On Mon, Jun 15, 2015 at 11:36 PM, Boštjan Mejak bostjan.xperia@gmail.com wrote:

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/OraIbkRMMEM/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

After the usual import wx you must also import wx.adv and then instead of calling wx.TaskBarIcon you must call wx.adv.TaskBarIcon and you’re golden. :wink:

Looking at Google, I found this: http://wxpython.org/Phoenix/docs/html/classic_vs_phoenix.html

It appears to reside in Icon now. You might also wan to take a look at the following: wxPython Project Phoenix Migration Guide — wxPython Phoenix 4.2.3a1 documentation

Hope that helps!
Mike

···

On Monday, June 15, 2015 at 3:39:02 PM UTC-5, Ram Rachum wrote:

Cool, works!

Now another thing I can’t find: wx.IconFromBitmap

Any idea where it is?

Thanks,

Ram.

I’ve tried replacing IconFromBitmap with Icon as advised, so my code looks like this:

self.SetIcon(

wx.Icon(

wx_tools.bitmap_tools.bitmap_from_pkg_resources(

resources_package,

‘cute_mouse_grid.png’

),

),

‘CuteMouseGrid’

)

(The bitmap_from_pkg_resources function creates a bitmap.)

But then I get an error dialog saying: “iCCP: known incorrect sRGB profile”.

Any idea how to solve this?

Thanks,

Ram.

···

On Tue, Jun 16, 2015 at 12:54 AM, Mike Driscoll kyosohma@gmail.com wrote:

On Monday, June 15, 2015 at 3:39:02 PM UTC-5, Ram Rachum wrote:

Cool, works!

Now another thing I can’t find: wx.IconFromBitmap

Any idea where it is?

Thanks,

Ram.

Looking at Google, I found this: http://wxpython.org/Phoenix/docs/html/classic_vs_phoenix.html

It appears to reside in Icon now. You might also wan to take a look at the following: http://wxpython.org/Phoenix/docs/html/MigrationGuide.html

Hope that helps!
Mike

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/OraIbkRMMEM/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

See the constructors in wx.Icon:
http://wxpython.org/Phoenix/docs/html/Icon.html#Icon

wx.Icon(bmp) should probably do it or
wx.Icon(nameOfBmp, type=wx.BITMAP_TYPE_ANY)

there is also wx.Icon.CopyFromBitmap

See:
http://wxpython.org/Phoenix/docs/html/classic_vs_phoenix.html
http://wxpython.org/Phoenix/docs/html/Icon.html#Icon

Werner

···

On 6/15/2015 22:38, Ram Rachum wrote:

Cool, works!

Now another thing I can't find: wx.IconFromBitmap

It seems your file is somehow corrupted, google could be your
friend:)
some others:
Werner

···

On 6/16/2015 9:19, Ram Rachum wrote:

    I've tried replacing IconFromBitmap with Icon as

advised, so my code looks like this:

self.SetIcon(

wx.Icon(

wx_tools.bitmap_tools.bitmap_from_pkg_resources(

resources_package,

‘cute_mouse_grid.png’

),

),

‘CuteMouseGrid’

)

(The bitmap_from_pkg_resources function creates a bitmap.)

      But then I get an error dialog saying: "iCCP: known

incorrect sRGB profile".

Any idea how to solve this?

http://stackoverflow.com/questions/22745076/libpng-warning-iccp-known-incorrect-srgb-profile

https://www.google.ch/search?q=iCCP:+known+incorrect+sRGB+profile&ie=utf-8&oe=utf-8&gws_rd=cr&ei=s-Z_VZ-1Asr7UPeFgtAN

That worked, thank you!

···

On Tue, Jun 16, 2015 at 12:07 PM, Werner wernerfbd@gmx.ch wrote:

On 6/16/2015 9:19, Ram Rachum wrote:

    I've tried replacing IconFromBitmap with Icon as

advised, so my code looks like this:

self.SetIcon(

wx.Icon(

wx_tools.bitmap_tools.bitmap_from_pkg_resources(

resources_package,

‘cute_mouse_grid.png’

),

),

‘CuteMouseGrid’

)

(The bitmap_from_pkg_resources function creates a bitmap.)

      But then I get an error dialog saying: "iCCP: known

incorrect sRGB profile".

Any idea how to solve this?

It seems your file is somehow corrupted, google could be your

friend:)

http://stackoverflow.com/questions/22745076/libpng-warning-iccp-known-incorrect-srgb-profile

some others:

https://www.google.ch/search?q=iCCP:+known+incorrect+sRGB+profile&ie=utf-8&oe=utf-8&gws_rd=cr&ei=s-Z_VZ-1Asr7UPeFgtAN

Werner

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/OraIbkRMMEM/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.