add select method for spinbox

This commit is contained in:
Jinhao 2018-05-11 17:16:34 +08:00
parent 57f69fde9f
commit 9b39d8490b
2 changed files with 13 additions and 0 deletions

View File

@ -103,6 +103,9 @@ namespace nana
std::pair<int, int> range_int() const;
std::pair<double, double> range_double() const;
/// Selects/unselects the text
void select(bool);
/// Gets the spined value
::std::string value() const;
void value(const ::std::string&);

View File

@ -696,6 +696,16 @@ namespace nana
return range->range();
}
void spinbox::select(bool sel)
{
internal_scope_guard lock;
if (handle())
{
get_drawer_trigger().impl()->editor()->select(sel);
API::refresh_window(*this);
}
}
::std::string spinbox::value() const
{
internal_scope_guard lock;