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.
text_box.cpp

The following code example demonstrate the use of text box control.

Windows

macOS

Gnome

#include <xtd/xtd>
using namespace xtd::forms;
namespace examples {
class form1 : public form {
public:
form1() {
text("Text box example");
text_box1.parent(*this);
text_box1.location({10, 10});
text_box1.text_changed += [&] {
text_box2.text(text_box1.text());
};
text_box1.text("text box");
text_box2.parent(*this);
text_box2.location({10, 50});
text_box2.text_changed += [&] {
text_box1.text(text_box2.text());
};
active_control(text_box2);
}
private:
text_box text_box1;
text_box text_box2;
};
}
int main() {
application::run(examples::form1());
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
@ text_box
The system-defined color of the accent color (macos specific. On other platform is same as window).
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13