xtd
0.2.0
form2.cpp
represents a window or dialog box that makes up an application's user interface.
Windows
macOS
Gnome
#include <xtd/xtd>
auto
main()->int {
auto
form
=
xtd::forms::form::create
(
"form1"
);
form
.form_closing += [](
auto
& sender,
auto
& event) {
event
.cancel(
xtd::forms::message_box::show
(
"Are you sure you want exit?"
,
"Close Form"
,
xtd::forms::message_box_buttons::yes_no
,
xtd::forms::message_box_icon::question
) ==
xtd::forms::dialog_result::no
);};
auto
button_close =
xtd::forms::button::create
(
form
,
"Close"
, {10, 10});
button_close.
click
+= {
form
, &
xtd::forms::form::close
};
xtd::forms::application::run
(
form
);
}
Generated on Sat Jun 10 2023 18:14:53 for xtd by
Gammasoft
. All rights reserved.