- // TODO
-}
-
-int wxComboBox::DoAppend(const wxString& item)
-{
- return m_choice->DoAppend( item ) ;
-}
-
-int wxComboBox::DoInsert(const wxString& item, int pos)
-{
- return m_choice->DoInsert( item , pos ) ;
-}
-
-void wxComboBox::DoSetItemClientData(int n, void* clientData)
-{
- return m_choice->DoSetItemClientData( n , clientData ) ;
-}
-
-void* wxComboBox::DoGetItemClientData(int n) const
-{
- return m_choice->DoGetItemClientData( n ) ;
-}
+ if ( m_text )
+ m_text->SetSelection(from,to);
+}
+
+int wxComboBox::DoInsertItems(const wxArrayStringsAdapter& items,
+ unsigned int pos,
+ void **clientData,
+ wxClientDataType type)
+{
+ // wxItemContainer should probably be doing it itself but usually this is
+ // not necessary as the derived class DoInsertItems() calls
+ // AssignNewItemClientData() which initializes m_clientDataItemsType
+ // correctly; however as we just forward everything to wxChoice, we need to
+ // do it ourselves
+ //
+ // also notice that we never use wxClientData_Object with wxChoice as we
+ // don't want it to delete the data -- we will
+ int rc = m_choice->DoInsertItems(items, pos, clientData,
+ clientData ? wxClientData_Void
+ : wxClientData_None) ;
+ if ( rc != wxNOT_FOUND )
+ {
+ if ( !HasClientData() && type != wxClientData_None )
+ m_clientDataItemsType = type;
+ }