[Pythonmac-SIG] Display icons from Carbon?
Kevin Walzer
kw at codebykevin.com
Wed Mar 21 18:42:32 CET 2007
I'm trying to figure out how to display Mac-native icons in my Python
application via Carbon. I can get the raw icon data via this snippet:
from Carbon import Icn
icon = Icn.GetIconRefFromFile('/Users/kevin/Desktop/myfile.doc')
print icon
(<_Res.Resource object at 0x4d110>, 0)
However, after this, I'm not sure how to proceed. It appears I need to
draw the icon using Icn.PlotIconRef, but there's no window in which to
display the icon using the raw Carbon calls. Has anyone done this
successfully from one of the GUI toolkits, say wxPython or Tkinter? (I'm
using the latter, for what it's worth.)
TIA,
Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
More information about the Pythonmac-SIG
mailing list