update the text of a read-only combobox (and hence wxChoice) when selection is changed too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-02-07 17:39:43 +00:00
parent ddaa6e899b
commit 365271b573

View File

@ -389,8 +389,8 @@ void wxComboBox::SetSelection(int n)
wxCHECK_RET( (n == wxNOT_FOUND || IsValid(n)), _T("invalid index in wxComboBox::Select") );
GetLBox()->SetSelection(n);
if ( GetTextCtrl() )
GetTextCtrl()->SetValue(GetLBox()->GetString(n));
SetText(GetLBox()->GetString(n));
}
int wxComboBox::GetSelection() const