X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a67a93b17c37c018f60e662645ee2a44ba4e58e..d9f9aa2d8fcb956444588b2c19ffe8d4a3f5d2bb:/src/mac/radiobox.cpp?ds=sidebyside diff --git a/src/mac/radiobox.cpp b/src/mac/radiobox.cpp index 3f3279dd04..905618716f 100644 --- a/src/mac/radiobox.cpp +++ b/src/mac/radiobox.cpp @@ -32,6 +32,22 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) // ¥ wxRadioBox() //------------------------------------------------------------------------------------- // Default constructor +BEGIN_EVENT_TABLE(wxRadioBox, wxControl) +EVT_RADIOBUTTON( -1 , wxRadioBox::OnRadioButton ) +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() { @@ -98,7 +114,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() ;