[wxPython] wxImage - Creating A New Image

Thanks very much for that Ron.
I did read the docs but couldn't make much sense of it all..... I was trying similar code was was un-successful, but you have cleared it up for me.

Thanks again.

Pete

···

On Tue, 24 July 2001, "CLARKE,RON (HP-Vancouver,ex1)" wrote:

Here is the way I have used various images for a tree control. Images of
various types live in the "bitmaps" folder in the application's directory.
        self.treectrl = wxTreeCtrl(self, self.ID, wxDefaultPosition,
wxDefaultSize)
        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: Peter Moscatt [mailto:pmoscatt@iprimus.com.au]
Sent: Monday, July 23, 2001 4:33 PM
To: wxpython-users@lists.wxwindows.org
Subject: [wxPython] wxImage - Creating A New Image

I am creating an app which houses a wxTreeCtrl where I would like to place
images next to the various tree structure items. I have done this by using
wxImage.

If I wanted to use another image that is not part of wxImage, how would I
append the already included images ??

For example, I have a file called 'folder.gif' which I want to place on the
tree structure - would this be done using wxImage ??

Pete

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

___________________________________________________
The ALL NEW CS2000 from CompuServe
Better! Faster! More Powerful!
250 FREE hours! Sign-on Now!
AOList Teil der Yahoo Markenfamilie