xtd 0.2.0
Loading...
Searching...
No Matches
hello_world_label.cpp

The classic first application "Hello, World!" with xtd::forms::label control.

Windows

macOS

Gnome

#include <xtd/xtd>
using namespace xtd::drawing;
using namespace xtd::forms;
namespace hello_world_label_example {
class main_form : public form {
public:
main_form() {
text("Hello world (label)");
controls().push_back(label1);
label1.dock(dock_style::fill);
label1.font({label1.font(), 32, font_style::bold | font_style::italic});
label1.fore_color(color::green);
label1.shadow(true);
label1.text("Hello, World!");
label1.text_align(content_alignment::middle_center);
}
private:
label label1;
};
}
auto main() -> int {
application::run(hello_world_label_example::main_form {});
}
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
Represents a standard Windows label.
Definition label.hpp:38
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:11
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12