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

demonstrates the use of xtd::forms::split_container container.

Windows

macOS

Gnome

#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/split_container>
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;
};
auto main() -> int {
application::run(form1 {});
}
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
Represents a control consisting of a movable bar that divides a container's display area into two res...
Definition split_container.hpp:27
@ horizontal
The control or element is oriented horizontally.
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:11
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12