]> git.saurik.com Git - wxWidgets.git/commitdiff
check the first radio button in a group
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Dec 2000 23:12:09 +0000 (23:12 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Dec 2000 23:12:09 +0000 (23:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/radiobut.cpp

index a9a7705f6011ac1c4c4f23783c61941047a1e4e6..261af8c3d36d42b28691227dfced53cfe4616f0e 100644 (file)
@@ -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;
 }