xtd
0.2.0
form_click.cpp
demonstrates the use of form event.
Windows
macOS
Gnome
#include <xtd/xtd>
using namespace
xtd
;
using namespace
xtd::forms
;
auto
main()->int {
form
form
;
form.
text
(
"Click anywhere on the form"
);
form.
mouse_click
+= [&](
object
& sender,
const
mouse_event_args
&
e
) {
if
(
e
.button() ==
mouse_buttons::left
)
message_box::show
(form,
ustring::format
(
"The form is clicked at {}"
,
e
.location()),
"form_click"
);
};
application::run
(form);
}
Generated on Sat Jun 10 2023 18:14:53 for xtd by
Gammasoft
. All rights reserved.