break;
case WM_GETDLGCODE:
- // we want to get WXK_RETURN in order to generate the event for it
- return DLGC_WANTALLKEYS;
+ if ( spin->HasFlag(wxTE_PROCESS_ENTER) )
+ {
+ long dlgCode = ::CallWindowProc
+ (
+ CASTWNDPROC spin->GetBuddyWndProc(),
+ hwnd,
+ message,
+ wParam,
+ lParam
+ );
+ dlgCode |= DLGC_WANTMESSAGE;
+ return dlgCode;
+ }
+ break;
}
return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(),
WXDWORD exStyle = 0;
WXDWORD msStyle = MSWGetStyle(GetWindowStyle(), & exStyle) ;
+ // propagate text alignment style to text ctrl
+ if ( style & wxALIGN_RIGHT )
+ msStyle |= ES_RIGHT;
+ else if ( style & wxALIGN_CENTER )
+ msStyle |= ES_CENTER;
+
// this control is used for numeric entry so normally using these flags by
// default shouldn't be a problem, if it is we can always add a style such
// as wxSP_NON_NUMERIC later
- msStyle |= ES_RIGHT | ES_NUMBER;
+ msStyle |= ES_NUMBER;
// calculate the sizes: the size given is the total size for both controls
// and we need to fit them both in the given width (height is the same)
void wxSpinCtrl::SetValue(int val)
{
m_blockEvent = true;
-
+
wxSpinButton::SetValue(val);
// normally setting the value of the spin button is enough as it updates
}
m_oldValue = GetValue();
-
+
m_blockEvent = false;
}