X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd04970ab45eb2f392af48b71aa9ecd5d4b1c8c2..41ab357ed9b661d9bbc55c841420b323237dbc15:/src/mac/carbon/combobox.cpp diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index bbc3110dbd..d1cc089a88 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: combobox.cpp +// Name: src/mac/carbon/combobox.cpp // Purpose: wxComboBox class // Author: Stefan Csomor // Modified by: @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "combobox.h" -#endif - #include "wx/wxprec.h" #if wxUSE_COMBOBOX @@ -89,7 +85,7 @@ protected: if (m_cb->GetEventHandler()->ProcessEvent(kevt)) // If the event was handled and not skipped then we're done return; - + if ( event.GetKeyCode() == WXK_RETURN ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_cb->GetId()); @@ -140,14 +136,14 @@ protected: if (! m_cb->GetEventHandler()->ProcessEvent(event)) event.Skip(); } - + void OnText( wxCommandEvent& event ) { event.SetEventObject(m_cb); event.SetId(m_cb->GetId()); if (! m_cb->GetEventHandler()->ProcessEvent(event)) event.Skip(); - } + } private: wxComboBox *m_cb; @@ -295,6 +291,9 @@ bool wxComboBox::Enable(bool enable) if ( !wxControl::Enable(enable) ) return false; + if (m_text) + m_text->Enable(enable); + return true; } @@ -382,7 +381,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, SetBestSize(size); // Needed because it is a wxControlWithItems SetStringSelection(value); - + return true; } @@ -569,9 +568,9 @@ void wxComboBox::SetSelection(int n) } } -int wxComboBox::FindString(const wxString& s) const +int wxComboBox::FindString(const wxString& s, bool bCase) const { - return m_choice->FindString( s ); + return m_choice->FindString( s, bCase ); } wxString wxComboBox::GetString(int n) const