From 484f1362b26d7fc4a5d173b5e70b6b7f5554234f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 7 Feb 2007 17:43:03 +0000 Subject: [PATCH] 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 --- docs/changes.txt | 1 + src/univ/combobox.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index bfc9e7027a..6a85584e46 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -113,6 +113,7 @@ wxMac wxX11: - Don't crash in wxWindow dtor if the window hadn't been really Create()d +- Update wxChoice value when SetSelection() is called wxUniv: diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index febde2efc1..b615a9b537 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -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