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;
/**
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.