wxMAC Icon bundles.

HI all,

I had someone on the pythonmac list ask if wx could read and work with OS-X icon bundles (*.icns). It sure looks like a wxIconBundle should be able to be created from one, but for the life of me, I can't figure out how, and googling didn't help.

I've enclosed a little test code (and sample icon file). This is the key line:

I = wx.IconBundle()
I.AddIconFromFile("BaroModes.icns", wx.BITMAP_TYPE_ICO)

wx.BITMAP_TYPE_ICO isn't right -- but what is?

Thanks,
-Chris

BaroModes.icns (25.7 KB)

TestWxIcon.py (529 Bytes)

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Christopher Barker wrote:

HI all,

I had someone on the pythonmac list ask if wx could read and work with OS-X icon bundles (*.icns). It sure looks like a wxIconBundle should be able to be created from one, but for the life of me, I can't figure out how, and googling didn't help.

I've enclosed a little test code (and sample icon file). This is the key line:

I = wx.IconBundle()
I.AddIconFromFile("BaroModes.icns", wx.BITMAP_TYPE_ICO)

wx.BITMAP_TYPE_ICO isn't right -- but what is?

I don't think there is a handler for .icns files yet...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

I don't think there is a handler for .icns files yet...

Darn. Oh well, if I ever need it bad enough, maybe I can contribute it.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov