diff --git a/include/wx/ownerdrw.h b/include/wx/ownerdrw.h index be2ae25d58..50e85b4a64 100644 --- a/include/wx/ownerdrw.h +++ b/include/wx/ownerdrw.h @@ -61,9 +61,14 @@ public: m_bmpUnchecked = bmpUnchecked; m_bOwnerDrawn = true; } - void SetBitmap(const wxBitmap& bmpChecked) - { m_bmpChecked = bmpChecked; - m_bOwnerDrawn = true; } + void SetBitmap(const wxBitmap& bmp, bool bChecked = true) + { + if ( bChecked ) + m_bmpChecked = bmp; + else + m_bmpUnchecked = bmp; + m_bOwnerDrawn = true; + } void SetDisabledBitmap( const wxBitmap& bmpDisabled ) { m_bmpDisabled = bmpDisabled; diff --git a/interface/wx/menuitem.h b/interface/wx/menuitem.h index 8566896a96..324dbdc0d2 100644 --- a/interface/wx/menuitem.h +++ b/interface/wx/menuitem.h @@ -274,11 +274,14 @@ public: /** Sets the bitmap for the menu item. - It is equivalent to wxMenuItem::SetBitmaps(bmp, wxNullBitmap). + + It is equivalent to wxMenuItem::SetBitmaps(bmp, wxNullBitmap) if @a + checked is @true (default value) or SetBitmaps(wxNullBitmap, bmp) + otherwise. @onlyfor{wxmsw,wxosx,wxgtk} */ - virtual void SetBitmap(const wxBitmap& bmp); + virtual void SetBitmap(const wxBitmap& bmp, bool checked = true); /** Sets the checked/unchecked bitmaps for the menu item.