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

The following code example demonstrate the use of tab_control container.

Windows

macOS

Gnome

#include <xtd/xtd>
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.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.parent(tab_page1);
label1.text("label1");
tab_page2.parent(tab_control1);
tab_page2.text("Tab page 2");
label2.dock(dock_style::fill);
label2.parent(tab_page2);
label2.text("label2");
tab_page3.parent(tab_control1);
tab_page3.text("Tab page 3");
label3.dock(dock_style::fill);
label3.parent(tab_page3);
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());
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
@ fill
All the control's edges are docked to the all edges of its containing control and sized appropriately...
@ bottom
The parent form of this multiple document interface (MDI) form is closing.
@ right
The Microsoft Windows Task Manager is closing the application.
@ left
The user is closing the form through the user interface (UI), for example by clicking the Close butto...
@ top
The operating system is closing all applications before shutting down.
@ top_left
Content is vertically aligned at the top, and horizontally aligned on the left.
@ bottom_right
Content is vertically aligned at the bottom, and horizontally aligned on the right.
@ middle_center
Content is vertically aligned at the middle, and horizontally aligned at the center.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13