xtd 0.2.0
lcd_label_with_nine_segment.cpp

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

Windows
lcd_label_with_nine_segment_w.png

lcd_label_with_nine_segment_wd.png
macOS
lcd_label_with_nine_segment_m.png

lcd_label_with_nine_segment_md.png
Gnome
lcd_label_with_nine_segment_g.png

lcd_label_with_nine_segment_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 nine segment example");
form_main.client_size({202, 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);
}