]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/spinctrl.cpp
default button on older systems was not shown with OK, but empty, resulting in wxID_C...
[wxWidgets.git] / src / mac / carbon / spinctrl.cpp
index 14d61671caa33967be1d1941510ff3db5f85561d..908ad7a0b56bd1623e9ae94098ad8ef57175c7b2 100644 (file)
@@ -15,7 +15,7 @@
 #include "wx/spinbutt.h"
 #include "wx/spinctrl.h"
 #include "wx/textctrl.h"
-
+#include "wx/containr.h"
 
 // ----------------------------------------------------------------------------
 // constants
@@ -138,6 +138,13 @@ END_EVENT_TABLE()
 
 IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl)
     
+BEGIN_EVENT_TABLE(wxSpinCtrl, wxControl)
+  WX_EVENT_TABLE_CONTROL_CONTAINER(wxSpinCtrl)
+END_EVENT_TABLE()
+
+WX_DELEGATE_TO_CONTROL_CONTAINER(wxSpinCtrl)
+
+
 // ============================================================================
 // implementation
 // ============================================================================
@@ -150,6 +157,7 @@ void wxSpinCtrl::Init()
 {
     m_text = NULL;
     m_btn = NULL;
+    m_container.SetContainerWindow(this);
 }
 
 bool wxSpinCtrl::Create(wxWindow *parent,
@@ -273,13 +281,6 @@ bool wxSpinCtrl::Show(bool show)
     return TRUE;
 }
 
-void wxSpinCtrl::SetFocus()
-{
-    if ( m_text != NULL) {
-        m_text->SetFocus();
-    }
-}
-
 // ----------------------------------------------------------------------------
 // value and range access
 // ----------------------------------------------------------------------------