// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
if ( !wxChoiceBase::Create( parent, id, pos, size, style, validator, name ) )
return false;
if ( !wxChoiceBase::Create( parent, id, pos, size, style, validator, name ) )
return false;
m_peer = wxWidgetImpl::CreateChoice( this, parent, id, m_popUpMenu, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size );
m_peer = wxWidgetImpl::CreateChoice( this, parent, id, m_popUpMenu, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size );
- m_popUpMenu->Insert( idx, i+1, items[i] );
+ wxString text = items[i];
+ if (text == wxEmptyString)
+ text = " "; // menu items can't have empty labels
+ m_popUpMenu->Insert( idx, i+1, text );
m_datas.Insert( NULL, idx );
AssignNewItemClientData(idx, clientData, i, type);
}
m_datas.Insert( NULL, idx );
AssignNewItemClientData(idx, clientData, i, type);
}
if ( HasClientObjectData() )
event.SetClientObject( GetClientObject( n ) );
else if ( HasClientUntypedData() )
if ( HasClientObjectData() )
event.SetClientObject( GetClientObject( n ) );
else if ( HasClientUntypedData() )