]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinctrl.cpp
wrong override params
[wxWidgets.git] / src / msw / spinctrl.cpp
index 05965d0c3d7d377a6b7df701ca19c5238a36aa6c..d7a13374d0a8b3cf121f0b989d3f8633f740bacb 100644 (file)
@@ -335,10 +335,16 @@ bool wxSpinCtrl::Create(wxWindow *parent,
     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)
@@ -475,7 +481,7 @@ void wxSpinCtrl::SetValue(const wxString& text)
 void  wxSpinCtrl::SetValue(int val)
 {
     m_blockEvent = true;
-    
+
     wxSpinButton::SetValue(val);
 
     // normally setting the value of the spin button is enough as it updates
@@ -491,7 +497,7 @@ void  wxSpinCtrl::SetValue(int val)
     }
 
     m_oldValue = GetValue();
-    
+
     m_blockEvent = false;
 }