]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/odcombo.cpp
Fail for assert(0,...).
[wxWidgets.git] / src / generic / odcombo.cpp
index 6386df709309cbfcd7fe9c403040bd754d6d724c..48ed294d6016478bba04e346cfc6c0625c5f0f51 100644 (file)
@@ -23,7 +23,7 @@
     #pragma hdrstop
 #endif
 
-#if wxUSE_OWNERDRAWNCOMBOBOX
+#if wxUSE_ODCOMBOBOX
 
 #include "wx/odcombo.h"
 
@@ -384,6 +384,8 @@ void wxVListBoxComboPopup::Clear()
 
     ClearClientDatas();
 
+    m_value = wxNOT_FOUND;
+
     if ( IsCreated() )
         wxVListBox::SetItemCount(0);
 }
@@ -557,11 +559,11 @@ void wxVListBoxComboPopup::Populate( const wxArrayString& choices )
 // ----------------------------------------------------------------------------
 
 
-BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboControl)
+BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboCtrl)
 END_EVENT_TABLE()
 
 
-IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboControl, wxControlWithItems)
+IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboCtrl, wxControlWithItems)
 
 void wxOwnerDrawnComboBox::Init()
 {
@@ -577,7 +579,7 @@ bool wxOwnerDrawnComboBox::Create(wxWindow *parent,
                                   const wxValidator& validator,
                                   const wxString& name)
 {
-    return wxComboControl::Create(parent,id,value,pos,size,style,validator,name);
+    return wxComboCtrl::Create(parent,id,value,pos,size,style,validator,name);
 }
 
 wxOwnerDrawnComboBox::wxOwnerDrawnComboBox(wxWindow *parent,
@@ -589,7 +591,7 @@ wxOwnerDrawnComboBox::wxOwnerDrawnComboBox(wxWindow *parent,
                                            long style,
                                            const wxValidator& validator,
                                            const wxString& name)
-    : wxComboControl()
+    : wxComboCtrl()
 {
     Init();
 
@@ -653,7 +655,7 @@ void wxOwnerDrawnComboBox::SetPopupControl( wxComboPopup* popup )
         popup = new wxVListBoxComboPopup();
     }
 
-    wxComboControl::SetPopupControl(popup);
+    wxComboCtrl::SetPopupControl(popup);
 
     wxASSERT(popup);
     m_popupInterface = (wxVListBoxComboPopup*) popup;
@@ -677,7 +679,7 @@ void wxOwnerDrawnComboBox::Clear()
 
     m_popupInterface->Clear();
 
-    GetTextCtrl()->SetValue(wxEmptyString);
+    SetValue(wxEmptyString);
 }
 
 void wxOwnerDrawnComboBox::Delete(unsigned int n)
@@ -780,4 +782,4 @@ wxClientData* wxOwnerDrawnComboBox::DoGetItemClientObject(unsigned int n) const
     return (wxClientData*) DoGetItemClientData(n);
 }
 
-#endif // wxUSE_OWNERDRAWNCOMBOBOX
+#endif // wxUSE_ODCOMBOBOX