One icon example:
Create an icon using your favorite editing tool (I used MS Visual Studio
resource editor), then:
icon = wxIcon('merlin.ico', wxBITMAP_TYPE_ICO)
Here is how I used wxBitmap to set up tree control images:
self.imglist = wxImageList(16, 16)
self.idxFC = self.imglist.Add(wxBitmap('bitmaps/folderClosed.bmp',
wxBITMAP_TYPE_BMP) )
self.idxFO = self.imglist.Add(wxBitmap('bitmaps/folderOpen.bmp',
wxBITMAP_TYPE_BMP) )
self.idxTI = self.imglist.Add(wxBitmap('bitmaps/treeitem.bmp',
wxBITMAP_TYPE_BMP) )
self.treectrl.SetImageList(self.imglist)
···
-----Original Message-----
From: Max Sloyko [mailto:cremofeel@mail.ru]
Sent: Thursday, August 02, 2001 11:27 AM
To: wxpython-users@lists.wxwindows.org
Subject: [wxPython] wxIcon and so on troubles
I have troubles using wxIcon, wxBitmap, wxImage classes:
the documentation about this classes seems to be out of data or something,
So i need to do the following thing: create icon, using
bmp file or existing wxBitmap object. How to do this??
The documentation insists, that there is a default constructor for wxIcon()
(no parameters)
but I found out that this is bull!!!
Oh! Almost forgot -- i'm Using wxGTK on gtk 1.2.6
Thanks!
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users