void wxBitmapComboBox::PostCreate()
{
m_fontHeight = GetCharHeight() + EXTRA_FONT_HEIGHT;
+
+ while ( m_bitmaps.GetCount() < GetCount() )
+ m_bitmaps.Add( new wxBitmap() );
}
wxBitmapComboBox::~wxBitmapComboBox()
void wxBitmapComboBox::SetItemBitmap(unsigned int n, const wxBitmap& bitmap)
{
- wxCHECK_RET( n < m_bitmaps.size(), wxT("invalid item index") );
+ wxCHECK_RET( n < GetCount(), wxT("invalid item index") );
OnAddBitmap(bitmap);
*GetBitmapPtr(n) = bitmap;
wxBitmap wxBitmapComboBox::GetItemBitmap(unsigned int n) const
{
- wxCHECK_MSG( n < m_bitmaps.size(), wxNullBitmap, wxT("invalid item index") );
+ wxCHECK_MSG( n < GetCount(), wxNullBitmap, wxT("invalid item index") );
return *GetBitmapPtr(n);
}
{
if ( GetCustomPaintWidth() == 0 ||
!(flags & wxODCB_PAINTING_SELECTED) ||
- item < 0 )
+ item < 0 ||
+ ( (flags & wxODCB_PAINTING_CONTROL) && (GetInternalFlags() & wxCC_FULL_BUTTON)) )
{
wxOwnerDrawnComboBox::OnDrawBackground(dc, rect, item, flags);
return;