xtd 0.2.0
toggle_buttons.cpp

demonstrates the use of xtd::forms::toggle_buttons toggle_button object collection.

Windows

macOS

Gnome

#include <xtd/drawing/texts>
#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/group_box>
#include <xtd/forms/toggle_buttons>
using namespace xtd::forms;
auto main() -> int {
auto form_main = form::create("toggle buttons example");
auto group_box_alignment = group_box::create(form_main, xtd::drawing::texts::alignment(), {10, 10}, {150, 240});
auto toggle_button_align_left = toggle_buttons::align_left(group_box_alignment, false, check_state::unchecked, {20, 20});
auto toggle_button_align_right = toggle_buttons::align_right(group_box_alignment, false, check_state::unchecked, {20, 70});
auto toggle_button_centered = toggle_buttons::centered(group_box_alignment, false, check_state::unchecked, {20, 120});
auto toggle_button_justified = toggle_buttons::justified(group_box_alignment, false, check_state::unchecked, {20, 170});
toggle_button_align_left.checked(true);
application::run(form_main);
}
static xtd::string alignment()
Gets a system-defined text that has a string value of "Alignment". This field is constant.
static void run()
Begins running a standard application message loop on the current thread, without a form.
static form create()
A factory to create an xtd::forms::form.
static group_box create()
A factory to create an xtd::forms::group_box.
static toggle_button justified()
Create a system-defined toggle_button that represent justified toggle_button.
static toggle_button centered()
Create a system-defined toggle_button that represent centered toggle_button.
static toggle_button align_right()
Create a system-defined toggle_button that represent align_right toggle_button.
static toggle_button align_left()
Create a system-defined toggle_button that represent align_left toggle_button.
@ unchecked
The control is unchecked.
Definition check_state.hpp:25
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219