xtd 0.2.0
panel.cpp

demonstrates the use of xtd::forms::panel container.

Windows

macOS

Gnome

#include <xtd/forms/application>
#include <xtd/forms/panel>
#include <xtd/forms/form>
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Panel example");
location({200, 200});
client_size({640, 480});
panel1.parent(*this);
panel1.border_style(forms::border_style::fixed_single);
panel1.location({10, 10});
panel1.size({305, 460});
panel2.parent(*this);
panel2.border_style(forms::border_style::fixed_3d);
panel2.location({325, 10});
panel2.size({305, 460});
}
private:
panel panel1;
panel panel2;
};
auto main() -> int {
application::run(form1 {});
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
Used to group collections of controls.
Definition panel.hpp:32
@ location
Specifies that both the x and y coordinates of the control are defined.
Definition bounds_specified.hpp:30
@ fixed_3d
A three-dimensional border. Same as xtd::forms::border_style::inset.
Definition border_style.hpp:58
@ fixed_single
A single-line border. Same as xtd::forms::border_style::solid.
Definition border_style.hpp:56
@ bottom
Bind control edges to the bottom of its container.
Definition anchor_styles.hpp:25
@ right
Bind control edges to the right of its container.
Definition anchor_styles.hpp:29
@ left
Bind control edges to the left of its container.
Definition anchor_styles.hpp:27
@ top
Bind control edges to the top of its container.
Definition anchor_styles.hpp:23
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:217
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