X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4a11fe85cb632368ba8426204598806460b7679..60b0c3b4c64a768bedb48b00477b7f6290d9fe23:/src/mac/carbon/combobox.cpp diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 5c728117c5..3f7ca169d5 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -20,6 +20,7 @@ #include "wx/menu.h" #include "wx/containr.h" #include "wx/toplevel.h" + #include "wx/textctrl.h" #endif #include "wx/mac/uma.h" @@ -49,16 +50,11 @@ MenuHandle NewUniqueMenu() // ---------------------------------------------------------------------------- // the margin between the text control and the choice -#if TARGET_API_MAC_OSX // margin should be bigger on OS X due to blue highlight // around text control. static const wxCoord MARGIN = 4; // this is the border a focus rect on OSX is needing static const int TEXTFOCUSBORDER = 3 ; -#else -static const wxCoord MARGIN = 2; -static const int TEXTFOCUSBORDER = 0 ; -#endif // ---------------------------------------------------------------------------- @@ -344,8 +340,13 @@ bool wxComboBox::Create(wxWindow *parent, const wxValidator& validator, const wxString& name) { - return Create( parent, id, value, pos, size, 0, NULL, - style, validator, name ); + if ( !Create( parent, id, value, pos, size, 0, NULL, + style, validator, name ) ) + return false; + + Append(choices); + + return true; } bool wxComboBox::Create(wxWindow *parent, @@ -417,6 +418,16 @@ void wxComboBox::SetValue(const wxString& value) m_text->SetValue( value ); } +void wxComboBox::WriteText(const wxString& text) +{ + m_text->WriteText(text); +} + +void wxComboBox::GetSelection(long *from, long *to) const +{ + m_text->GetSelection(from, to); +} + // Clipboard operations void wxComboBox::Copy()