Skip to content

Commit

Permalink
Update first_programs.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed May 22, 2024
1 parent 5b54673 commit fa985ee
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/documentation/eBook/first_programs.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@ namespace tutorial {
controls().push_back(label);
dock(xtd::forms::dock_style::fill);
size({150, 100});

label.location({65, 45});
label.text("0");
}

xtd::forms::label label;
};

class panel_left : public xtd::forms::panel {
public:
panel_left() {
Expand All @@ -234,7 +234,7 @@ namespace tutorial {
panel_right& panel = static_cast<panel_right&>(form.controls()[0].get());
panel.label.text(xtd::ustring::format("{}", count));
};

button_minus.auto_repeat(true);
button_minus.location({30, 60});
button_minus.text("-");
Expand All @@ -245,20 +245,21 @@ namespace tutorial {
panel.label.text(xtd::ustring::format("{}", count));
};
}

xtd::forms::button button_plus;
xtd::forms::button button_minus;
int count = 0;
};

class communicate : public xtd::forms::form {
public:
communicate() {
client_size({300, 100});
controls().push_back_range({panel_right, panel_left});
padding(10);
client_size({320, 120});
text("communicate");
}

static auto main() {
xtd::forms::application::run(communicate());
}
Expand Down

0 comments on commit fa985ee

Please sign in to comment.