SetSelection() for generic wxSpinCtrl (forgot to commit before)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -66,6 +66,7 @@ public:
|
|||||||
void SetValue(int val);
|
void SetValue(int val);
|
||||||
void SetValue(const wxString& text);
|
void SetValue(const wxString& text);
|
||||||
void SetRange(int min, int max);
|
void SetRange(int min, int max);
|
||||||
|
void SetSelection(long from, long to);
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
int GetValue() const;
|
int GetValue() const;
|
||||||
|
@@ -366,5 +366,12 @@ void wxSpinCtrl::SetRange(int min, int max)
|
|||||||
m_btn->SetRange(min, max);
|
m_btn->SetRange(min, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxSpinCtrl::SetSelection(long from, long to)
|
||||||
|
{
|
||||||
|
wxCHECK_RET( m_text, _T("invalid call to wxSpinCtrl::SetSelection") );
|
||||||
|
|
||||||
|
m_text->SetSelection(from, to);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // wxUSE_SPINCTRL
|
#endif // wxUSE_SPINCTRL
|
||||||
#endif // !wxPort-with-native-spinctrl
|
#endif // !wxPort-with-native-spinctrl
|
||||||
|
Reference in New Issue
Block a user