xtd 1.0.0
Loading...
Searching...
No Matches
xtd::forms::trace_message_box Class Reference
Inheritance diagram for xtd::forms::trace_message_box:
xtd::static_object

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
Dark
Examples
The following code example demonstrates the use of trace_message_box dialog.
#define TRACE 1 // Force to trace even if example is builded with -DNTRACE.
#include <xtd/xtd>
class form_main : public form {
public:
form_main() {
button_.parent(*this);
button_.location({10, 10});
button_.text("Error...");
button_.click += delegate_ {
trace_message_box::show(*this, "An unknown process error occured.");
};
}
static auto main() {
auto tf = trace_form {};
}
private:
button button_;
};
startup_(form_main::main);
static auto run() -> void
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
auto parent(const xtd::forms::control &value) -> xtd::forms::control &override
Sets the parent container of the control.
static auto show(const xtd::string &text) -> xtd::forms::dialog_result
Displays a message box and write trace with specified text.
Definition trace_message_box.hpp:42
#define delegate_
The declaration of a delegate type is similar to a method signature. It has a return value and any nu...
Definition delegate.hpp:1018
#define startup_(...)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:284
xtd::forms::style_sheets::control button
The buttton data allows you to specify the box of a button control.
Definition button.hpp:25

Public Static Methods

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

Member Function Documentation

◆ show() [1/2]

auto xtd::forms::trace_message_box::show ( const xtd::string & text) -> xtd::forms::dialog_result
inlinestatic

Displays a message box and write trace with specified text.

Parameters
textThe text to display in the message box.

◆ show() [2/2]

auto xtd::forms::trace_message_box::show ( const xtd::forms::iwin32_window & owner,
const xtd::string & text ) -> xtd::forms::dialog_result
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: