-bool wxBitmapComboBox::DoInsertBitmap(const wxBitmap& bitmap, unsigned int pos)
-{
- if ( !OnAddBitmap(bitmap) )
- return false;
-
- // NB: We must try to set the image before DoInsert or
- // DoAppend because OnMeasureItem might be called
- // before it returns.
- m_bitmaps.Insert( new wxBitmap(bitmap), pos);
-
- return true;
-}
-
-int wxBitmapComboBox::DoAppendWithImage(const wxString& item, const wxBitmap& image)
-{
- unsigned int pos = m_bitmaps.size();
-
- if ( !DoInsertBitmap(image, pos) )
- return wxNOT_FOUND;
-
- int index = wxOwnerDrawnComboBox::DoAppend(item);
-
- if ( index < 0 )
- index = m_bitmaps.size();
-
- // Need to re-check the index incase DoAppend sorted
- if ( (unsigned int) index != pos )