X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd0a76e228b5ce47c648c2e52857e77cf79e6ae5..09cbc94feafe9c5a424eb1d462589f9620a1977e:/src/msw/radiobox.cpp?ds=inline diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index c6e913c1c2..b4fd6df3af 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -378,6 +378,11 @@ void wxRadioBox::SetSelection(int N) { wxCHECK_RET( (N >= 0) && (N < GetCount()), wxT("invalid radiobox index") ); + // unselect the old button + if ( m_selectedButton != wxNOT_FOUND ) + ::SendMessage((*m_radioButtons)[m_selectedButton], BM_SETCHECK, 0, 0L); + + // and select the new one ::SendMessage((*m_radioButtons)[N], BM_SETCHECK, 1, 0L); m_selectedButton = N;