X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b884f4c74dc5257afcac0c14d2b6ca712ed807a..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/mac/carbon/spinctrl.cpp diff --git a/src/mac/carbon/spinctrl.cpp b/src/mac/carbon/spinctrl.cpp index 5db84619e4..40e5211fbd 100644 --- a/src/mac/carbon/spinctrl.cpp +++ b/src/mac/carbon/spinctrl.cpp @@ -12,7 +12,7 @@ #pragma implementation "spinctrl.h" #endif -#include "wx/defs.h" +#include "wx/wxprec.h" #if wxUSE_SPINCTRL @@ -27,7 +27,7 @@ // the focus rect around a text may have 4 pixels in each direction // we handle these problems right now in an extended vis region of a window -static const wxCoord TEXTBORDER = 0 ; +static const wxCoord TEXTBORDER = 4 ; // the margin between the text control and the spin static const wxCoord MARGIN = 8 - TEXTBORDER; @@ -194,7 +194,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, //SetSize(csize); - MacPostControlCreate(pos, csize); + //MacPostControlCreate(pos, csize); SetInitialBestSize(csize); return TRUE; @@ -267,6 +267,13 @@ bool wxSpinCtrl::Show(bool show) return TRUE; } +void wxSpinCtrl::SetFocus() +{ + if ( m_text != NULL) { + m_text->SetFocus(); + } +} + // ---------------------------------------------------------------------------- // value and range access // ----------------------------------------------------------------------------