The combobox didn't like empty strings at all. It

caused the pop-up-list to get skrewed up.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2002-05-23 20:35:14 +00:00
parent 72763bfed4
commit 22a70443db
2 changed files with 16 additions and 6 deletions

View File

@ -60,8 +60,9 @@ protected:
void OnTextChange( wxCommandEvent& event )
{
wxString s = GetValue();
m_cb->DelegateTextChanged( s );
if (!s.IsEmpty())
m_cb->DelegateTextChanged( s );
event.Skip();
}
@ -366,7 +367,11 @@ void wxComboBox::SetSelection(long from, long to)
void wxComboBox::Append(const wxString& item)
{
m_choice->DoAppend( item );
// I am not sure what other ports do,
// but wxMac chokes on empty entries.
if (!item.IsEmpty())
m_choice->DoAppend( item );
}
void wxComboBox::Delete(int n)

View File

@ -60,8 +60,9 @@ protected:
void OnTextChange( wxCommandEvent& event )
{
wxString s = GetValue();
m_cb->DelegateTextChanged( s );
if (!s.IsEmpty())
m_cb->DelegateTextChanged( s );
event.Skip();
}
@ -366,7 +367,11 @@ void wxComboBox::SetSelection(long from, long to)
void wxComboBox::Append(const wxString& item)
{
m_choice->DoAppend( item );
// I am not sure what other ports do,
// but wxMac chokes on empty entries.
if (!item.IsEmpty())
m_choice->DoAppend( item );
}
void wxComboBox::Delete(int n)