int min = 0, int max = 100, int initial = 0,
const wxString& name = _T("wxSpinCtrl"));
+ // wxTextCtrl-like method
+ void SetSelection(long from, long to);
+
virtual ~wxSpinCtrl();
// operations
m_btn->SetRange(min, max);
}
+void wxSpinCtrl::SetSelection(long from, long to)
+{
+ // if from and to are both -1, it means (in wxWindows) that all text should
+ // be selected
+ if ( (from == -1) && (to == -1) )
+ {
+ from = 0;
+ }
+ m_text->SetSelection(from, to);
+}
+
#endif // wxUSE_SPINCTRL
m_btn->SetRange(min, max);
}
+void wxSpinCtrl::SetSelection(long from, long to)
+{
+ // if from and to are both -1, it means (in wxWindows) that all text should
+ // be selected
+ if ( (from == -1) && (to == -1) )
+ {
+ from = 0;
+ }
+ m_text->SetSelection(from, to);
+}
+
#endif // wxUSE_SPINCTRL