[wxPython-users] add a toolbar to a frame

C M cmpython at gmail.com
Tue Jul 31 19:26:24 PDT 2007


Whoops, in that last code, replace


            toolbar.DoAddTool (bitmap=3Dwx.Bitmap(u'C:/Documents and
> Settings/user/Desktop/sample_image.gif',
>               wx.BITMAP_TYPE_JPEG), bmpDisabled=3Dwx.NullBitmap,
>               id=3D-1, kind=3Dwx.ITEM_NORMAL, label=3D'tool',
>               longHelp=3D'', shortHelp=3D'john')
>

with the wx.BITMAP_TYPE_JPEG changed to wx>BITMAP_TYPE_GIF if it is indeed a
.gif file.  If it is a .jpg or .png, change it accordingly.  And of course
make sure that directory I used matches how your desktop is named.  Then it
should work.  I sugges the sample image you use be a solid color and not
have large white sections so that you can tell it is not just blank, as the
sizing of the image may be cut off weird (this is just to get you started).

-CM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200707=
31/6e3af288/attachment.htm


More information about the wxpython-users mailing list