xtd 0.2.0
Loading...
Searching...
No Matches
trace_message_dialog.cpp

demonstrates the use of xtd::forms::trace_message_dialog dialog.

Windows

macOS

Gnome

#define TRACE
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/forms/trace_form>
#include <xtd/forms/trace_message_dialog>
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
button_show_debug_message.location({10, 10});
button_show_debug_message.parent(*this);
button_show_debug_message.text("Error...");
button_show_debug_message.auto_size(true);
button_show_debug_message.click += [&] {
auto dialog = trace_message_dialog {};
dialog.message("An unknown process error occured.");
dialog.show_sheet_dialog(*this);
};
}
private:
button button_show_debug_message;
};
auto main() -> int {
auto tf = trace_form {};
application::run(form1 {});
}
Represents a Windows button control.
Definition button.h:49
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
Represents a form that displays trace form. This class cannot be inherited.
Definition trace_form.h:36
Displays a message window and write debug, which presents a debug message to the user.
Definition trace_message_dialog.h:29
xtd::string message() const noexcept
Gets the text message.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12