[wxPython] wxBitmap appears differently in wxTreeCtrl and wxToolBar

I am having a minor problem with a Windows .bmp bitmap. I am using it in a wxImageList in combination with a wxTreeCtrl. This works fine. I am using the same icon in a toolbar created by a wxFrame. Here, the magenta colour appears as white. Is this bug in the toolbar window, or am I doing something wrong? I have attached the icon if anyone wishes to put it in a toolbar.

class CTopFrame(wxFrame):
    def __init__(self, parent, ID, title):
        wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, wxDefaultSize, wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION)
        self.toolBar = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER|wxTB_FLAT)
        self.toolBar.SetToolBitmapSize(wxSize(16, 16))

        self.toolBar.AddTool(toolBarNewComponent, wxBitmap("magenta.bmp", wxBITMAP_TYPE_BMP))

Cheers,

James Shaw

magenta.bmp (246 Bytes)

···

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

I am having a minor problem with a Windows .bmp bitmap. I am using it in

a

wxImageList in combination with a wxTreeCtrl. This works fine. I am

using

the same icon in a toolbar created by a wxFrame. Here, the magenta colour
appears as white. Is this bug in the toolbar window, or am I doing
something wrong? I have attached the icon if anyone wishes to put it in a
toolbar.

The native toolbar does some strange things with colors sometimes, I can
never remember what and why though. Try editing the image and changing it
to not be "pure" magenta (IOW, 7f,00,7f instead of 80,00,80) and see if that
makes a difference. If not then please ask this on wx-users.

···

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