X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/289532452089421ddadbd4726a8469511a19ab76..ab7049776d45e622f621dd06216a4c1a1ad34b15:/src/osx/listbox_osx.cpp diff --git a/src/osx/listbox_osx.cpp b/src/osx/listbox_osx.cpp index 624eb806ff..982dad0705 100644 --- a/src/osx/listbox_osx.cpp +++ b/src/osx/listbox_osx.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: src/osx/carbon/listbox.cpp +// Name: src/osx/listbox_osx.cpp // Purpose: wxListBox // Author: Stefan Csomor // Modified by: @@ -71,8 +71,11 @@ bool wxListBox::Create( const wxValidator& validator, const wxString& name ) { + DontCreatePeer(); m_blockEvents = false; - m_macIsUserPane = false; + + if ( ! (style & wxNO_BORDER) ) + style = (style & ~wxBORDER_MASK) | wxSUNKEN_BORDER ; wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED), wxT("only a single listbox selection mode can be specified") ); @@ -85,7 +88,7 @@ bool wxListBox::Create( else m_strings.unsorted = new wxArrayString; - m_peer = wxWidgetImpl::CreateListBox( this, parent, id, pos, size, style, GetExtraStyle() ); + SetPeer(wxWidgetImpl::CreateListBox( this, parent, id, pos, size, style, GetExtraStyle() )); MacPostControlCreate( pos, size ); @@ -106,7 +109,7 @@ wxListBox::~wxListBox() m_blockEvents = false; // make sure no native events get sent to a object in destruction - wxDELETE(m_peer); + SetPeer(NULL); if ( IsSorted() ) delete m_strings.sorted; @@ -327,7 +330,6 @@ int wxListBox::FindString(const wxString& s, bool bCase) const void wxListBox::OnItemInserted(unsigned int WXUNUSED(pos)) { - } int wxListBox::DoInsertItems(const wxArrayStringsAdapter& items,