]> git.saurik.com Git - wxWidgets.git/commitdiff
update the text of a read-only combobox (and hence wxChoice) when selection is change...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 7 Feb 2007 17:39:43 +0000 (17:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 7 Feb 2007 17:39:43 +0000 (17:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/combobox.cpp

index febde2efc112c6b7910e102e55b076c8dc85947e..b615a9b53727ae8294a715ce9df5615956e337b8 100644 (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