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

demonstrates the use of xtd::forms::group_box container and xtd::forms::check_box control.

Windows

macOS

Gnome

#include <xtd/forms/application>
#include <xtd/forms/check_box>
#include <xtd/forms/form>
#include <xtd/forms/group_box>
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Group box and check box example");
client_size({300, 160});
group_box1.parent(*this);
group_box1.bounds({10, 10, 135, 140});
group_box1.text("Group 1");
group_box2.parent(*this);
group_box2.bounds({155, 10, 135, 140});
group_box2.text("Group 2");
check_box1.location({20, 10});
check_box1.parent(group_box1);
check_box1.text("check 1");
check_box2.checked(true);
check_box2.location({20, 40});
check_box2.parent(group_box1);
check_box2.text("check 2");
check_box3.location({20, 70});
check_box3.parent(group_box1);
check_box3.text("check 3");
check_box4.location({20, 10});
check_box4.parent(group_box2);
check_box4.text("check 4");
check_box5.location({20, 40});
check_box5.parent(group_box2);
check_box5.text("check 5");
check_box6.checked(true);
check_box6.location({20, 70});
check_box6.parent(group_box2);
check_box6.text("check 6");
}
private:
group_box group_box1;
group_box group_box2;
check_box check_box1;
check_box check_box2;
check_box check_box3;
check_box check_box4;
check_box check_box5;
check_box check_box6;
};
auto main() -> int {
application::run(form1 {});
}
Represents a Windows check_box.
Definition check_box.h:45
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
Represents a Windows control that displays a frame around a group of controls with an optional captio...
Definition group_box.h:37
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