xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
radio_buttons.cpp

The following code example demonstrate the use of radio_button control factory.

Windows

macOS

Gnome

#include <xtd/xtd>
using namespace xtd::forms;
int main() {
auto form_main = control::create<form>("Radio buttons example");
auto group_box_alignment = control::create<group_box>(*form_main, system_texts::alignment(), {10, 10}, {150, 180});
auto radio_button_align_left = radio_buttons::align_left(*group_box_alignment, {20, 20});
auto radio_button_align_right = radio_buttons::align_right(*group_box_alignment, {20, 50});
auto radio_button_centered = radio_buttons::centered(*group_box_alignment, {20, 80});
auto radio_button_justified = radio_buttons::justified(*group_box_alignment, {20, 110});
radio_button_align_left->checked(true);
application::run(*form_main);
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
static std::unique_ptr< radio_button > align_right(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const drawing::color &back_color=drawing::color::empty, const drawing::color &fore_color=drawing::color::empty)
Create a system-defined radio_button that represent align right radio_button.
Definition: radio_buttons.h:119
static std::unique_ptr< radio_button > centered(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const drawing::color &back_color=drawing::color::empty, const drawing::color &fore_color=drawing::color::empty)
Create a system-defined radio_button that represent centered radio_button.
Definition: radio_buttons.h:239
static std::unique_ptr< radio_button > justified(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const drawing::color &back_color=drawing::color::empty, const drawing::color &fore_color=drawing::color::empty)
Create a system-defined radio_button that represent justified radio_button.
Definition: radio_buttons.h:659
static std::unique_ptr< radio_button > align_left(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const drawing::color &back_color=drawing::color::empty, const drawing::color &fore_color=drawing::color::empty)
Create a system-defined radio_button that represent align left radio_button.
Definition: radio_buttons.h:104
static xtd::ustring alignment()
Gets a system-defined text that has a string value of "Alignment". This field is constant.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13