[wxPython] Small icon on Windows

A Windows question:

I have an icon file that contains both a 32x32 icon (which is supposed to show up when you press Alt-Tab to switch between applications) and a 16x16 icon (which is supposed to go in the upper-left corner of the title bar and in the task bar at the bottom of the screen). I don't want it to shrink down the 32x32 icon to 16x16, because it looks better to use the actual 16x16 icon in the icon file. But I can't find a way to get the correct icons to be displayed. The following code is all I could get to work, and it displays a shrunk-down version of the 32x32 icon in place of the correct 16x16 icon:

from wxPython.wx import *

class MyApp(wxApp):
    def OnInit(self):
        frame = wxFrame(NULL, -1, "My Frame", wxDefaultPosition, wxSize(350, 200))
        icon = wxIcon('MyIcon.ico', wxBITMAP_TYPE_ICO)
        frame.SetIcon(icon)
        frame.Show(TRUE)
        return TRUE

app = MyApp(0)
app.MainLoop()

···

--

- Geoff Talvola
  Parlance Corporation
  gtalvola@NameConnector.com

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

I sent this 2 weeks ago and got no response, so I thought I'd try one more time...

···

--------

A Windows question:

I have an icon file that contains both a 32x32 icon (which is supposed to show up when you
press Alt-Tab to switch between applications) and a 16x16 icon (which is supposed to go in the
upper-left corner of the title bar and in the task bar at the bottom of the screen). I don't
want it to shrink down the 32x32 icon to 16x16, because it looks better to use the actual
16x16 icon in the icon file. But I can't find a way to get the correct icons to be displayed.
The following code is all I could get to work, and it displays a shrunk-down version of the
32x32 icon in place of the correct 16x16 icon:

from wxPython.wx import *

class MyApp(wxApp):
    def OnInit(self):
        frame = wxFrame(NULL, -1, "My Frame", wxDefaultPosition, wxSize(350, 200))
        icon = wxIcon('MyIcon.ico', wxBITMAP_TYPE_ICO)
        frame.SetIcon(icon)
        frame.Show(TRUE)
        return TRUE

app = MyApp(0)
app.MainLoop()

--

- Geoff Talvola
  Parlance Corporation
  gtalvola@NameConnector.com

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

I sent this 2 weeks ago and got no response, so I thought I'd try one more time...

I forwarded it to wx-users and I don't think there wasa response there either. You may want to ask it there again or on wx-devel. That's where the people who probably know the answer are at.

···

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

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users