+ if (!cbs->set)
+ return;
+
+ wxRadioButton *item = (wxRadioButton *) clientData;
+ if (item->InSetValue())
+ return;
+
+ //based on mac/radiobut.cpp
+ wxRadioButton* old = item->ClearSelections();
+ item->SetValue(TRUE);
+
+ if ( old )
+ {
+ wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED,
+ old->GetId() );
+ event.SetEventObject(old);
+ event.SetInt( FALSE );
+ old->ProcessCommand(event);
+ }
+ wxCommandEvent event2(wxEVT_COMMAND_RADIOBUTTON_SELECTED, item->GetId() );
+ event2.SetEventObject(item);
+ event2.SetInt( TRUE );
+ item->ProcessCommand(event2);
+}