demonstrates the use of xtd::forms::form control.
- Windows
-
- macOS
-
- Gnome
-
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/forms/label>
auto main() -> int {
auto button1_clicked = 0, button2_clicked = 0;
button1.click += [&] {label1.text(
xtd::string::format(
"Button 1 clicked {} times", ++button1_clicked));};
button2.auto_repeat(
true).click += [&] {label2.text(
xtd::string::format(
"Button 2 clicked {} times", ++button2_clicked));};
}