#include "wx/spinbutt.h"
#include "wx/spinctrl.h"
#include "wx/textctrl.h"
-
+#include "wx/containr.h"
// ----------------------------------------------------------------------------
// constants
SetSizeHints(-1,-1);
}
+ bool ProcessEvent(wxEvent &event)
+ {
+ // Hand button down events to wxSpinCtrl. Doesn't work.
+ if (event.GetEventType() == wxEVT_LEFT_DOWN && m_spin->ProcessEvent( event ))
+ return TRUE;
+
+ return wxTextCtrl::ProcessEvent( event );
+ }
+
protected:
void OnTextChange(wxCommandEvent& event)
{
event.Skip();
}
- bool ProcessEvent(wxEvent &event)
- {
- // Hand button down events to wxSpinCtrl. Doesn't work.
- if (event.GetEventType() == wxEVT_LEFT_DOWN && m_spin->ProcessEvent( event ))
- return TRUE;
-
- return wxTextCtrl::ProcessEvent( event );
- }
-
private:
wxSpinCtrl *m_spin;
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
// ============================================================================
{
m_text = NULL;
m_btn = NULL;
+ m_container.SetContainerWindow(this);
}
bool wxSpinCtrl::Create(wxWindow *parent,
return TRUE;
}
-void wxSpinCtrl::SetFocus()
-{
- if ( m_text != NULL) {
- m_text->SetFocus();
- }
-}
-
// ----------------------------------------------------------------------------
// value and range access
// ----------------------------------------------------------------------------