// know whether this is a horizontal or vertical control (we're always
// vertical)
style |= wxSP_VERTICAL;
+
+ if ( (style & wxBORDER_MASK) == wxBORDER_DEFAULT )
+ style |= wxBORDER_SUNKEN;
+
SetWindowStyle(style);
// calculate the sizes: the size given is the toal size for both controls
return n;
}
+void wxSpinCtrl::SetSelection(long from, long to)
+{
+ // if from and to are both -1, it means (in wxWindows) that all text should
+ // be selected - translate into Windows convention
+ if ( (from == -1) && (to == -1) )
+ {
+ from = 0;
+ }
+
+ ::SendMessage((HWND)m_hwndBuddy, EM_SETSEL, (WPARAM)from, (LPARAM)to);
+}
+
// ----------------------------------------------------------------------------
// forward some methods to subcontrols
// ----------------------------------------------------------------------------