#include <xtd/forms/application>
#include <xtd/forms/horizontal_layout_panel>
#include <xtd/forms/form>
#include <xtd/forms/panel>
#include <xtd/drawing/colors>
#include <xtd/startup>
class form_main :
public form {
public:
form_main() {
text("Horizontal layout panel example");
layout_panel.parent(*this);
layout_panel.controls().push_back_range({light_pink_panel, light_green_panel, light_blue_panel, light_yellow_panel});
layout_panel.control_layout_style(light_pink_panel, {30, size_type::absolute, true});
layout_panel.control_layout_style(light_green_panel, {.70f, size_type::percent, true});
layout_panel.control_layout_style(light_blue_panel, {.15f, size_type::percent, true});
layout_panel.control_layout_style(light_yellow_panel, {size_type::auto_size, true});
layout_panel.dock(dock_style::fill);
light_pink_panel.back_color(colors::light_pink());
light_green_panel.back_color(colors::light_green());
light_blue_panel.back_color(colors::light_blue());
light_yellow_panel.back_color(colors::light_yellow());
}
static auto main() {
}
private:
panel light_yellow_panel;
};
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.h:175
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.h:11
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10