From a9c317d27ce06a16238c7da1aee6712c07989b93 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 16 Dec 2000 23:12:09 +0000 Subject: [PATCH] check the first radio button in a group git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/radiobut.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index a9a7705f60..261af8c3d3 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -138,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; } -- 2.50.0