ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxPython-users
wxPython-users
Re: [wxPython-users] Re: Setting icons
by Alexander 'boesi' =?ISO-8859-1?Q?B=F6secke?= other posts by this author
Dec 13 2004 7:23AM messages near this date
[wxPython-users] Re: Setting icons | Re: [wxPython-users] Setting icons
Hi

Am 07.12.2004 19:01:36 schrieb Philipp Jocham:


>  I use the following approach, where icon.ico contains all sizes:
>  [...]

thx alot, that works as expected
I have done some more experiments and there seems to be a problem with
determince the size of an icon. From the following ways producing a 
wxIcon, only the first two returns an icon in (16, 16), all others are 
(32, 32).

1.      # logo.ico contains the icon in sizes 16, 32, 48
        icon = wx.Icon('logo.ico', wx.BITMAP_TYPE_ICO, desiredWidth=16, desiredHeight=16)
        print 16, icon.GetHeight(), icon.GetWidth()        

2.      icon = wx.EmptyIcon()
        icon.LoadFile('logo16.ico', wx.BITMAP_TYPE_ICO)
        icon.SetWidth(16)
        icon.SetHeight(16)
        print 16, icon.GetHeight(), icon.GetWidth()

3.      icon = wx.EmptyIcon()
        icon.SetWidth(16)
        icon.SetHeight(16)
        icon.LoadFile('logo16.ico', wx.BITMAP_TYPE_ICO)
        print 16, icon.GetHeight(), icon.GetWidth()

4.      icon = wx.EmptyIcon()
        icon.LoadFile('logo16.ico', wx.BITMAP_TYPE_ICO)
        print 16, icon.GetHeight(), icon.GetWidth()

5.      icon = wx.Icon('logo16.ico', wx.BITMAP_TYPE_ICO)
        print 16, icon.GetHeight(), icon.GetWidth()

6.      icon = wx.Icon('logo32.ico', wx.BITMAP_TYPE_ICO)
        print 32, icon.GetHeight(), icon.GetWidth()

7.      icon = wx.Icon('logo48.ico', wx.BITMAP_TYPE_ICO)
        print 48, icon.GetHeight(), icon.GetWidth()

When I'm the next time in my firm, I'll write the bug report (it's
really annoying not having a flatrate...)

cu boesi
-- 
Ein Wunder muss heute schon ganz schoen              #1671 : icq-intern
wundervoll sein um ein Wunder zu sein,           #73628288 : icq-extern
sonst wuerde man sich ja gar nicht mehr wundern   boesi111 : aim
                 .-==Prof. Dr. Harald Lesch==-.       i171 : reallife          

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@[...].org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Thread:
Alexander 'boesi' =?ISO-8859-1?Q?B=F6secke?=
Philipp Jocham
Alexander 'boesi' =?ISO-8859-1?Q?B=F6secke?=
Robin Dunn

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved