xtd 0.2.0
Loading...
Searching...
No Matches
up_down_button.cpp

demonstrates the use of xtd::forms::up_down_button control.

Windows

macOS

Gnome

#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/label>
#include <xtd/forms/up_down_button>
using namespace xtd;
using namespace xtd::forms;
namespace up_down_button_example {
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(string::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;
};
}
auto main() -> int {
application::run(up_down_button_example::form1 {});
}
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
Represents a standard Windows label.
Definition label.hpp:38
Represents a standard Windows up down button.
Definition up_down_button.hpp:35
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10