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

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

Windows

macOS

Gnome

#include <xtd/forms/application>
#include <xtd/forms/domain_up_down>
#include <xtd/forms/form>
#include <xtd/forms/label>
using namespace xtd;
using namespace xtd::forms;
namespace domain_up_down_example {
class form1 : public form {
public:
form1() {
text("Domain up down example");
domain_up_down1.parent(*this);
domain_up_down1.location({10, 10});
domain_up_down1.items().push_back_range({"item 1", "item 2", "item 3", "item 4", "item 5", "item 6", "item 7", "item 8", "item 9", "item 10"});
domain_up_down1.text_changed += [&] {
label1.text(string::format("value = {}", domain_up_down1.text()));
};
domain_up_down1.selected_index(1);
label1.parent(*this);
label1.location({10, 50});
}
private:
domain_up_down domain_up_down1;
label label1;
};
}
auto main() -> int {
application::run(domain_up_down_example::form1 {});
}
Represents a Windows spin box (also known as an up-down control) that displays string values.
Definition domain_up_down.h:33
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
Represents a standard Windows label.
Definition label.h:38
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10