xtd 0.2.0
lcd_label_with_dot_matrix.cpp

demonstrates how to use xtd::forms::lcd_label_with_dot_matrix control.

Windows
lcd_label_with_dot_matrix_w.png

lcd_label_with_dot_matrix_wd.png
macOS
lcd_label_with_dot_matrix_m.png

lcd_label_with_dot_matrix_md.png
Gnome
lcd_label_with_dot_matrix_g.png

lcd_label_with_dot_matrix_gd.png
#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/lcd_label>
#include <xtd/forms/timer>
using namespace xtd;
using namespace xtd::drawing;
using namespace xtd::forms;
auto main()->int {
auto index = 0_sz;
form form_main;
form_main.text("Lcd label with dot matrix example");
form_main.client_size({403, 403});
label.parent(form_main);
label.dock(dock_style::fill);
label.text(ustring::format("{}", label.valid_characters()[index]));
timer.interval(300_ms);
timer.enabled(!timer.enabled());
timer.tick += [&] {
if (++index >= label.valid_characters().size()) index = 0;
label.text(ustring::format("{}", label.valid_characters()[index]));
};
application::run(form_main);
}