From bec08b3946f50c9b35d44f2001950d12043a49ea Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 10 Sep 2006 23:08:13 +0000 Subject: [PATCH] allow wxRB_GROUP to be changed after creation (patch 1544686) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/radiobut.h | 2 ++ src/msw/radiobut.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/wx/msw/radiobut.h b/include/wx/msw/radiobut.h index af598b9451..43a8e30e32 100644 --- a/include/wx/msw/radiobut.h +++ b/include/wx/msw/radiobut.h @@ -50,6 +50,8 @@ public: virtual void Command(wxCommandEvent& event); virtual bool HasTransparentBackground() { return true; } + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + protected: virtual wxSize DoGetBestSize() const; diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 61ab90ded2..dddab3e26a 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -314,4 +314,14 @@ wxSize wxRadioButton::DoGetBestSize() const return best; } +WXDWORD wxRadioButton::MSWGetStyle(long style, WXDWORD *exstyle) const +{ + WXDWORD styleMSW = wxControl::MSWGetStyle(style, exstyle); + + if ( style & wxRB_GROUP ) + styleMSW |= WS_GROUP; + + return styleMSW; +} + #endif // wxUSE_RADIOBTN -- 2.45.2