update wxChoice value when SetSelection() is called

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-02-07 17:43:03 +00:00
parent bdcb00e8ec
commit 484f1362b2
2 changed files with 3 additions and 2 deletions

View File

@@ -113,6 +113,7 @@ wxMac
wxX11: wxX11:
- Don't crash in wxWindow dtor if the window hadn't been really Create()d - Don't crash in wxWindow dtor if the window hadn't been really Create()d
- Update wxChoice value when SetSelection() is called
wxUniv: wxUniv:

View File

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