X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f74ab0041bf55ab9377f6da8f3356a182378e36a..062dfc9a96dc9e796c53544f41ff92dc47f26e82:/src/generic/odcombo.cpp diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index 7321ec28d8..06ca2e58a5 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -642,6 +642,16 @@ int wxVListBoxComboPopup::FindString(const wxString& s, bool bCase) const return m_strings.Index(s, bCase); } +bool wxVListBoxComboPopup::FindItem(const wxString& item, wxString* trueItem) +{ + int idx = m_strings.Index(item, false); + if ( idx == wxNOT_FOUND ) + return false; + if ( trueItem != NULL ) + *trueItem = m_strings[idx]; + return true; +} + unsigned int wxVListBoxComboPopup::GetCount() const { return m_strings.GetCount(); @@ -855,7 +865,7 @@ void wxVListBoxComboPopup::Populate( const wxArrayString& choices ) // Find initial selection wxString strValue = m_combo->GetValue(); - if ( strValue.length() ) + if ( !strValue.empty() ) m_value = m_strings.Index(strValue); } @@ -867,21 +877,6 @@ void wxVListBoxComboPopup::Populate( const wxArrayString& choices ) BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboCtrl) END_EVENT_TABLE() - -#if wxUSE_EXTENDED_RTTI -IMPLEMENT_DYNAMIC_CLASS2_XTI(wxOwnerDrawnComboBox, wxComboCtrl, wxControlWithItems, "wx/odcombo.h") - -wxBEGIN_PROPERTIES_TABLE(wxOwnerDrawnComboBox) -wxEND_PROPERTIES_TABLE() - -wxBEGIN_HANDLERS_TABLE(wxOwnerDrawnComboBox) -wxEND_HANDLERS_TABLE() - -wxCONSTRUCTOR_5( wxOwnerDrawnComboBox , wxWindow* , Parent , wxWindowID , Id , wxString , Value , wxPoint , Position , wxSize , Size ) -#else -IMPLEMENT_DYNAMIC_CLASS2(wxOwnerDrawnComboBox, wxComboCtrl, wxControlWithItems) -#endif - void wxOwnerDrawnComboBox::Init() { }