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

demonstrates the use of xtd::forms::text_box_password control.

Windows

macOS

Gnome

#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/label>
#include <xtd/forms/text_box>
using namespace xtd::forms;
namespace text_box_password2_example {
class form1 : public form {
public:
form1() {
text("Text box password example");
*this << text_box1 << label1;
active_control(text_box1);
text_box1.location({10, 10});
text_box1.password_char('@');
text_box1.text_changed += [&] {
label1.text(text_box1.text());
};
text_box1.text("123456");
label1.location({10, 50});
label1.auto_size(true);
}
private:
text_box text_box1;
label label1;
};
}
auto main()->int {
application::run(text_box_password2_example::form1 {});
}
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:52
Represents a standard Windows label.
Definition label.h:36
Represents a standard Windows text box.
Definition text_box.h:29
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12