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 );
if ( HasClientObjectData() )
delete GetClientObject( n );
-
+
m_popUpMenu->Delete( m_popUpMenu->FindItemByPosition( n ) );
m_strings.RemoveAt( n ) ;
event.SetInt( n );
event.SetString( GetStringSelection() );
event.SetEventObject( this );
-
+
if ( HasClientObjectData() )
event.SetClientObject( GetClientObject( n ) );
else if ( HasClientUntypedData() )
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;
{
wxCoord width, height ;
dc.GetTextExtent( wxT("X"), &width, &height);
int cx = width ;
- lbHeight += 4;
lbWidth += cx ;
}