X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/421a84317fc3d53ac4fd64613f1af2d19018efc5..7475e8146203b9f75ea01247eb456209ed7b7c13:/src/cocoa/combobox.mm diff --git a/src/cocoa/combobox.mm b/src/cocoa/combobox.mm index 3d6564ad8a..ae2b9015fd 100644 --- a/src/cocoa/combobox.mm +++ b/src/cocoa/combobox.mm @@ -3,12 +3,16 @@ // Purpose: wxComboBox // Author: David Elliott // Modified by: -// Created: 2003/03/16 -// RCS-ID: $Id: +// Created: 2003/07/14 +// RCS-ID: $Id$ // Copyright: (c) 2003 David Elliott -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#include "wx/wxprec.h" + +#if wxUSE_COMBOBOX + #include "wx/app.h" #include "wx/combobox.h" #include "wx/log.h" @@ -37,12 +41,14 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID winid, return false; m_cocoaNSView = NULL; - SetNSTextField([[NSComboBox alloc] initWithFrame:NSMakeRect(0,0,30,30)]); + SetNSTextField([[NSComboBox alloc] initWithFrame:MakeDefaultNSRect(size)]); [m_cocoaNSView release]; [GetNSTextField() setStringValue:wxNSStringWithWxString(value.c_str())]; [GetNSControl() sizeToFit]; if(m_parent) m_parent->CocoaAddChild(this); + SetInitialFrameRect(pos,size); + return true; } @@ -59,7 +65,7 @@ wxString wxComboBox::GetStringSelection() return wxEmptyString; } -void wxComboBox::SetStringSelection(wxString& selection) +void wxComboBox::SetStringSelection(const wxString& selection) { } @@ -123,3 +129,4 @@ wxClientData* wxComboBox::DoGetItemClientObject(int) const return NULL; } +#endif //wxUSE_COMBOBOX