#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/tab_control>
#include <xtd/forms/tab_page>
#include <xtd/forms/text_box>
#include <xtd/system_report>
class main_form :
public form {
public:
main_form() {
text("System reports example");
start_position(form_start_position::center_screen);
report_tab_control.dock(dock_style::fill);
report_tab_control.parent(*this);
report_tab_control.tab_pages().push_back_range({text_report_tab_page, json_report_tab_page, xml_report_tab_page});
text_report_tab_page.text("text");
json_report_tab_page.text("json");
xml_report_tab_page.text("xml");
text_reports_text_box.dock(dock_style::fill);
text_reports_text_box.font({drawing::font_family::generic_monospace(), text_reports_text_box.font().size()});
text_reports_text_box.multiline(true);
text_reports_text_box.parent(text_report_tab_page);
text_reports_text_box.read_only(true);
text_reports_text_box.text(system_report::to_string());
text_reports_text_box.word_wrap(false);
json_reports_text_box.dock(dock_style::fill);
json_reports_text_box.font({drawing::font_family::generic_monospace(), json_report_tab_page.font().size()});
json_reports_text_box.multiline(true);
json_reports_text_box.parent(json_report_tab_page);
json_reports_text_box.read_only(true);
json_reports_text_box.text(system_report::to_json());
json_reports_text_box.word_wrap(false);
xml_reports_text_box.dock(dock_style::fill);
xml_reports_text_box.font({drawing::font_family::generic_monospace(), xml_reports_text_box.font().size()});
xml_reports_text_box.multiline(true);
xml_reports_text_box.parent(xml_report_tab_page);
xml_reports_text_box.read_only(true);
xml_reports_text_box.text(system_report::to_xml());
xml_reports_text_box.word_wrap(false);
}
private:
};
auto main() -> int {
application::run(main_form());
}
Represents a single tab page in a tab_control.
Definition tab_page.hpp:33
Represents a standard Windows text box.
Definition text_box.hpp:31
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10