xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
lcd_label.cpp

The following code example demonstrate the use of lcd_label control.

Windows

macOS

Gnome

#include <xtd/xtd>
using namespace std;
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Lcd label example");
numeric_up_down1.location({10, 10});
numeric_up_down1.parent(*this);
numeric_up_down1.set_range(0, 15000000);
numeric_up_down1.increment(0.01);
numeric_up_down1.decimal_place(2);
numeric_up_down1.value_changed += [&] {
lcd_label1.text(ustring::format("{,11:F2}", numeric_up_down1.value()));
};
numeric_up_down1.value(12345678.90);
lcd_label1.location({10, 50});
lcd_label1.parent(*this);
lcd_label1.segment_style(segment_style::modern);
lcd_label1.auto_size(true);
}
private:
numeric_up_down numeric_up_down1;
lcd_label lcd_label1;
};
int main() {
application::run(form1());
}
Represents a window or dialog box that makes up an application's user interface.
Definition: form.h:40
Represents a lcd label.
Definition: lcd_label.h:31
Represents a standard Windows numeric up down.
Definition: numeric_up_down.h:24
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17