X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4931d5d6a032076de63b97f3872d40826d1a37d1..41616c8ac6ac50854924f312f23e6c1ac9ce7238:/src/osx/choice_osx.cpp?ds=sidebyside diff --git a/src/osx/choice_osx.cpp b/src/osx/choice_osx.cpp index d9b3932dee..2668c1b1cd 100644 --- a/src/osx/choice_osx.cpp +++ b/src/osx/choice_osx.cpp @@ -72,10 +72,10 @@ bool wxChoice::Create(wxWindow *parent, if ( !wxChoiceBase::Create( parent, id, pos, size, style, validator, name ) ) return false; - + m_popUpMenu = new wxMenu(); m_popUpMenu->SetNoEventsMode(true); - + m_peer = wxWidgetImpl::CreateChoice( this, parent, id, m_popUpMenu, pos, size, style, GetExtraStyle() ); MacPostControlCreate( pos, size ); @@ -142,7 +142,7 @@ void wxChoice::DoDeleteOneItem(unsigned int n) if ( HasClientObjectData() ) delete GetClientObject( n ); - + m_popUpMenu->Delete( m_popUpMenu->FindItemByPosition( n ) ); m_strings.RemoveAt( n ) ; @@ -241,7 +241,7 @@ bool wxChoice::OSXHandleClicked( double WXUNUSED(timestampsec) ) event.SetInt( n ); event.SetString( GetStringSelection() ); event.SetEventObject( this ); - + if ( HasClientObjectData() ) event.SetClientObject( GetClientObject( n ) ); else if ( HasClientUntypedData() ) @@ -256,7 +256,8 @@ bool wxChoice::OSXHandleClicked( double WXUNUSED(timestampsec) ) wxSize wxChoice::DoGetBestSize() const { int lbWidth = GetCount() > 0 ? 20 : 100; // some defaults - int lbHeight = 20; + wxSize baseSize = wxWindow::DoGetBestSize(); + int lbHeight = baseSize.y; int wLine; {