From: David Elliott Date: Wed, 20 Aug 2003 17:44:37 +0000 (+0000) Subject: The default state for the first radio button in a group should be selected X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bd8e6e3742990810f3c4f76b519d257b44e984da The default state for the first radio button in a group should be selected git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/cocoa/radiobut.mm b/src/cocoa/radiobut.mm index a4d9d46d5e..29e001cadf 100644 --- a/src/cocoa/radiobut.mm +++ b/src/cocoa/radiobut.mm @@ -71,6 +71,9 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID winid, [m_cocoaNSView release]; [GetNSButton() setButtonType: NSRadioButton]; [GetNSButton() setTitle:wxNSStringWithWxString(label)]; + // If it's the first in a group, it should be selected + if(style&wxRB_GROUP) + [GetNSButton() setState: NSOnState]; [GetNSControl() sizeToFit]; if(m_parent)