xtd 0.2.0
xtd::forms::trace_message_box Class Reference

Definition

Displays a dialog box and write trace.

Header
#include <xtd/forms/trace_message_box>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light  
dialog_trace_message_box_w.png
    html dialog_trace_message_box_m.png    html dialog_trace_message_box_g.png 
Dark  
dialog_trace_message_box_wd.png
    html dialog_trace_message_box_md.png    html dialog_trace_message_box_gd.png 
Examples
The following code example demonstrates the use of trace_message_box dialog.
#define TRACE
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/forms/trace_form>
#include <xtd/forms/trace_message_box>
#include <xtd/startup>
using namespace xtd;
using namespace xtd::diagnostics;
using namespace xtd::drawing;
using namespace xtd::forms;
class form_main : public form {
public:
form_main() {
button_.parent(*this);
button_.location({10, 10});
button_.text("Error...");
button_.click += [&] {
trace_message_box::show(*this, "An unknown process error occured.");
};
}
static auto main() {
auto tf = trace_form {};
}
private:
button button_;
};
startup_(form_main::main);

Methods

static xtd::forms::dialog_result show (const xtd::ustring &text)
 Displays a message box and write trace with specified text. More...
 
static xtd::forms::dialog_result show (const xtd::forms::iwin32_window &owner, const xtd::ustring &text)
 Displays a message box in front of the specified window and write trace with specified text. More...
 

Member Function Documentation

◆ show() [1/2]

static xtd::forms::dialog_result xtd::forms::trace_message_box::show ( const xtd::ustring text)
inlinestatic

Displays a message box and write trace with specified text.

Parameters
textThe text to display in the message box.

◆ show() [2/2]

static xtd::forms::dialog_result xtd::forms::trace_message_box::show ( const xtd::forms::iwin32_window owner,
const xtd::ustring text 
)
inlinestatic

Displays a message box in front of the specified window and write trace with specified text.

Parameters
ownerAn implementation of iwin32_window that will own the modal dialog box.
textThe text to display in the message box.

The documentation for this class was generated from the following file: