// without tons of #ifdefs.
// ----------------------------------------------------------------------------
-#if wxUSE_SPINBTN
+#if wxUSE_SPINBTN
#include "wx/containr.h"
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxSP_ARROW_KEYS,
+ long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
int min = 0, int max = 100, int initial = 0,
- const wxString& name = _T("wxSpinCtrl"))
+ const wxString& name = wxT("wxSpinCtrl"))
{
Init();
Create(parent, id, value, pos, size, style, min, max, initial, name);
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxSP_ARROW_KEYS,
+ long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
int min = 0, int max = 100, int initial = 0,
- const wxString& name = _T("wxSpinCtrl"));
+ const wxString& name = wxT("wxSpinCtrl"));
// wxTextCtrl-like method
void SetSelection(long from, long to);
// implementation from now on
// forward these functions to all subcontrols
- virtual bool Enable(bool enable = TRUE);
- virtual bool Show(bool show = TRUE);
+ virtual bool Enable(bool enable = true);
+ virtual bool Show(bool show = true);
// get the subcontrols
wxTextCtrl *GetText() const { return m_text; }
// the subcontrols
wxTextCtrl *m_text;
wxSpinButton *m_btn;
-
+
friend class wxSpinCtrlText;
friend class wxSpinCtrlButton;
-
+
int m_oldValue;
private:
DECLARE_EVENT_TABLE()
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxSP_ARROW_KEYS,
+ long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
int min = 0, int max = 100, int initial = 0,
- const wxString& name = _T("wxSpinCtrl"))
+ const wxString& name = wxT("wxSpinCtrl"))
{
Create(parent, id, value, pos, size, style, min, max, initial, name);
}
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxSP_ARROW_KEYS,
+ long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
int min = 0, int max = 100, int initial = 0,
- const wxString& name = _T("wxSpinCtrl"))
+ const wxString& name = wxT("wxSpinCtrl"))
{
SetRange(min, max);