This repository was archived by the owner on Jan 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtab_control.cpp
More file actions
57 lines (45 loc) · 1.37 KB
/
Copy pathtab_control.cpp
File metadata and controls
57 lines (45 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <xtd/xtd.forms>
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Tab control example");
controls().push_back(tab_control1);
client_size({390, 270});
tab_control1.anchor(anchor_styles::left | anchor_styles::top | anchor_styles::right | anchor_styles::bottom);
tab_control1.location({10, 10});
tab_control1.size({370, 250});
tab_page1.parent(tab_control1);
tab_page1.text("Tab page 1");
label1.dock(dock_style::fill);
label1.location({10, 10});
label1.parent(tab_page1);
label1.text("label1");
label1.text_align(xtd::forms::content_alignment::top_left);
tab_page2.parent(tab_control1);
tab_page2.text("Tab page 2");
label2.dock(dock_style::fill);
label2.location({10, 10});
label2.parent(tab_page2);
label2.text_align(xtd::forms::content_alignment::middle_center);
label2.text("label2");
tab_page3.parent(tab_control1);
tab_page3.text("Tab page 3");
label3.dock(dock_style::fill);
label3.location({10, 10});
label3.parent(tab_page3);
label3.text_align(xtd::forms::content_alignment::bottom_right);
label3.text("label3");
}
private:
tab_control tab_control1;
tab_page tab_page1;
tab_page tab_page2;
tab_page tab_page3;
label label1;
label label2;
label label3;
};
int main() {
application::run(form1());
}