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.
split_container.cpp

The following code example demonstrate the use of split_container container.

Windows

macOS

Gnome

#include <xtd/xtd>
using namespace xtd::drawing;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Split container example");
client_size({300, 300});
split_container_left.parent(*this);
split_container_left.dock(dock_style::fill);
split_container_left.panel1().back_color(color::light_blue);
split_container_left.splitter_distance(70);
split_container_right.dock(dock_style::fill);
split_container_right.panel2().back_color(color::light_yellow);
split_container_right.parent(split_container_left.panel2());
split_container_right.splitter_distance(160);
split_container_center.dock(dock_style::fill);
split_container_center.orientation(xtd::forms::orientation::horizontal);
split_container_center.panel1().back_color(color::pink);
split_container_center.panel2().back_color(color::light_green);
split_container_center.parent(split_container_right.panel1());
split_container_center.splitter_distance(150);
}
private:
split_container split_container_left;
split_container split_container_right;
split_container split_container_center;
};
int main() {
application::run(form1());
}
static const xtd::drawing::color light_yellow
Gets a system-defined color that has an ARGB value of 0xFFFFFFE0. This field is constant.
Definition: color.h:273
static const xtd::drawing::color light_blue
Gets a system-defined color that has an ARGB value of 0xFFADD8E6. This field is constant.
Definition: color.h:237
static const xtd::drawing::color light_green
Gets a system-defined color that has an ARGB value of 0xFF90EE90. This field is constant.
Definition: color.h:252
static const xtd::drawing::color pink
Gets a system-defined color that has an ARGB value of 0xFFFFC0CB. This field is constant.
Definition: color.h:375
@ horizontal
The control or element is oriented horizontally.
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition: bitmap.h:11
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13