X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..6c34d0ede9d6f7086896a1e4467091f0360846de:/src/msw/radiobut.cpp diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 6a10d9168d..261af8c3d3 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -39,6 +39,7 @@ bool wxRadioButton::MSWCommand(WXUINT param, WXWORD id) { wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId); event.SetEventObject( this ); + event.SetInt( GetValue() ); ProcessCommand(event); return TRUE; } @@ -137,6 +138,13 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, SetSize(x, y, width, height); + // for compatibility with wxGTK, the first radio button in a group is + // always checked (this makes sense anyhow as you need to ensure that at + // least one button in the group is checked and this is the simlpest way to + // do it) + if ( m_windowStyle & wxRB_GROUP ) + SetValue(TRUE); + return TRUE; }