demonstrates the use of xtd::forms::vertical_layout_panel container.
- Windows
-
- macOS
-
- Gnome
-
#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/panel>
#include <xtd/forms/vertical_layout_panel>
#include <xtd/drawing/colors>
#include <xtd/startup>
class form_main :
public form {
public:
form_main() {
text(
"Vertical layout panel example");
controls().push_back(layout_panel);
layout_panel.controls().push_back_range({light_pink_panel, light_green_panel, light_blue_panel, light_yellow_panel});
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);
}
static auto main() {
}
private:
panel light_yellow_panel;
};