1. corrected some asserts/crashes in controls

2. added test for SetValue() in text


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-04-17 00:01:16 +00:00
parent 59d3027c0c
commit 833a6790ad
2 changed files with 13 additions and 6 deletions

View File

@@ -917,9 +917,11 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event )
{
int idx;
idx = m_listbox->GetSelection();
m_listbox->Delete( idx );
if ( idx != wxNOT_FOUND )
m_listbox->Delete( idx );
idx = m_listboxSorted->GetSelection();
m_listboxSorted->Delete( idx );
if ( idx != wxNOT_FOUND )
m_listboxSorted->Delete( idx );
break;
}
case ID_LISTBOX_FONT:
@@ -1000,9 +1002,11 @@ void MyPanel::OnChoiceButtons( wxCommandEvent &event )
case ID_CHOICE_DELETE:
{
int idx = m_choice->GetSelection();
m_choice->Delete( idx );
if ( idx != wxNOT_FOUND )
m_choice->Delete( idx );
idx = m_choiceSorted->GetSelection();
m_choiceSorted->Delete( idx );
if ( idx != wxNOT_FOUND )
m_choiceSorted->Delete( idx );
break;
}
case ID_CHOICE_FONT:

View File

@@ -531,10 +531,13 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event)
WriteText("\n");
break;
default:
LogEvent( wxT("Key down"), event);
case WXK_F6:
SetValue("F6 was just pressed.");
break;
}
LogEvent( wxT("Key down"), event);
event.Skip();
}