demonstrates the use of xtd::forms::form container as dialog.
- Windows
-
- macOS
-
- Gnome
-
#include <xtd/drawing/texts>
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
class dialog :
public form {
public:
dialog() {
accept_button(ok_button);
client_size({195, 75});
minimize_box(false);
text("Dialog");
ok_button.dialog_result(dialog_result::ok);
ok_button.location({60, 40});
ok_button.parent(*this);
}
public:
};
auto main() -> int {
dialog().show_dialog(
form);
};
}
static xtd::string ok()
Gets a system-defined text that has a string value of "&OK". This field is constant.