]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/radiobox.cpp
Added extra MicroWindows functions
[wxWidgets.git] / src / mac / radiobox.cpp
index b18f098d3c4197e811a6c974acbddbda93a67f81..c7bf4dce281ff9f8b3207758c648772a5cc7f78f 100644 (file)
@@ -17,6 +17,8 @@
 #pragma implementation "radiobox.h"
 #endif
 
+#include "wx/defs.h"
+
 #include "wx/radiobox.h"
 #include "wx/radiobut.h"
 #include "wx/mac/uma.h"
@@ -38,12 +40,15 @@ END_EVENT_TABLE()
 
 void wxRadioBox::OnRadioButton( wxCommandEvent &outer )
 {
+  if ( outer.IsChecked() )
+  {
     wxCommandEvent event(wxEVT_COMMAND_RADIOBOX_SELECTED, m_windowId);
     int i = GetSelection() ;
     event.SetInt( i );
     event.SetString( GetString( i ) );
     event.SetEventObject( this );
     ProcessCommand(event);
+  }
 }
 
 wxRadioBox::wxRadioBox()
@@ -111,7 +116,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
        
        MacPreControlCreate( parent , id ,  label , pos , size ,style, val , name , &bounds , title ) ;
 
-       m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , 0 , 1, 
+       m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1, 
                kControlGroupBoxTextTitleProc , (long) this ) ;
        
        MacPostControlCreate() ;