xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
up_down_button.cpp

The following code example demonstrate the use of up down button control.

Windows
up_down_button_w.png

up_down_button_wd.png
macOS
up_down_button_m.png

up_down_button_md.png
Gnome
up_down_button_g.png

up_down_button_gd.png
#include <xtd/xtd>
using namespace xtd;
using namespace xtd::forms;
namespace examples {
class form1 : public form {
public:
form1() {
text("Up down button example");
up_down_button1.parent(*this);
up_down_button1.location({10, 10});
up_down_button1.value_changed += [&] {
label1.text(ustring::format("value = {}", up_down_button1.value()));
};
up_down_button1.minimum(10);
up_down_button1.maximum(20);
up_down_button1.value(15);
up_down_button1.wrapped(true);
label1.parent(*this);
label1.location({10, 50});
}
private:
up_down_button up_down_button1;
label label1;
};
}
int main() {
application::run(examples::form1());
}