Shows how to set minimum size, set maximum size, move and resize a form.
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/button_images>
#include <xtd/forms/form>
class form1 :
public form {
public:
form1() {
client_size({220, 115});
minimum_client_size(client_size());
controls().push_back_range({up_button, left_button, right_button, down_button, shrink_button, grow_button});
text(
"Form resize example");
key_down += [&](
auto sender,
auto e) {
};
key_press += [&](
auto sender,
auto e) {
};
up_button.auto_repeat(true);
up_button.bounds({45, 10, 25, 25});
up_button.click += [&] {
};
left_button.auto_repeat(true);
left_button.bounds({10, 45, 25, 25});
left_button.click += [&] {
};
right_button.auto_repeat(true);
right_button.bounds({80, 45, 25, 25});
right_button.click += [&] {
};
down_button.auto_repeat(true);
down_button.bounds({45, 80, 25, 25});
down_button.click += [&] {
};
shrink_button.auto_repeat(true);
shrink_button.bounds({150, 45, 25, 25});
shrink_button.click += [&] {
};
grow_button.auto_repeat(true);
grow_button.bounds({185, 45, 25, 25});
grow_button.click += [&] {
};
}
private:
};
auto main() -> int {
}
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
@ e
The E key.
Definition console_key.hpp:96
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Stores an ordered pair of integers, which specify a height and width.
Definition size.hpp:31