xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
splitter.cpp

The following code example demonstrate the use of splitter control.

Windows

macOS

Gnome

#include <xtd/xtd>
using namespace xtd;
using namespace xtd::drawing;
using namespace xtd::forms;
namespace examples {
class form1 : public form {
public:
form1() {
text("Splitter example");
client_size({300, 300});
controls().push_back_range({panel_fill, splitter_top, panel_top, splitter_right, panel_right, splitter_left, panel_left});
panel_left.dock(dock_style::left);
panel_left.back_color(drawing::color::light_blue);
panel_left.width(70);
splitter_left.dock(dock_style::left);
panel_right.dock(dock_style::right);
panel_right.back_color(drawing::color::light_yellow);
panel_right.width(70);
splitter_right.dock(dock_style::right);
panel_top.dock(dock_style::top);
panel_top.back_color(drawing::color::light_pink);
panel_top.height(150);
splitter_top.dock(dock_style::top);
panel_fill.dock(dock_style::fill);
panel_fill.back_color(drawing::color::light_green);
}
private:
panel panel_left;
splitter splitter_left;
panel panel_right;
splitter splitter_right;
panel panel_top;
splitter splitter_top;
panel panel_fill;
};
}
int main() {
application::run(examples::form1());
}
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:40
Used to group collections of controls.
Definition panel.h:21
Represents a splitter control that enables the user to resize docked controls.
Definition splitter.h:22
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
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition system_report.h:17