---
name: "wxMessageDialog"
section: "3erl"
platform: "linux"
package: "erlang-manpages"
version: "1:25.2.3+dfsg-1+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/wxMessageDialog"
---

# wxMessageDialog(3erl)

Functions for wxMessageDialog class

## NAME

wxMessageDialog - Functions for wxMessageDialog class

## DESCRIPTION

This class represents a dialog that shows a single or multi-line message, with a choice of OK, Yes, No and Cancel buttons.

Styles

This class supports the following styles:

See: Overview cmndlg

See: *wxRichMessageDialog* (not implemented in wx)

This class is derived (and can use functions) from: *wxDialog* *wxTopLevelWindow* *wxWindow* *wxEvtHandler*

wxWidgets docs: wxMessageDialog

## DATA TYPES

```
wxMessageDialog() = wx:wx_object()
```

## EXPORTS

```
new(Parent, Message) -> wxMessageDialog()
```

Types:

Parent = wxWindow:wxWindow()\
 Message = unicode:chardata()\

```
new(Parent, Message, Options :: [Option]) -> wxMessageDialog()
```

Types:

Parent = wxWindow:wxWindow()\
 Message = unicode:chardata()\
 Option = \
\
     {caption, unicode:chardata()} \|\
\
     {style, integer()} \|\
\
     {pos, {X :: integer(), Y :: integer()}}\

Constructor specifying the message box properties.

Use *wxDialog:showModal/1* to show the dialog.

*style* may be a bit list of the identifiers described above.

Notice that not all styles are compatible: only one of *wxOK* and *wxYES\_NO* may be specified (and one of them must be specified) and at most one default button style can be used and it is only valid if the corresponding button is shown in the message box.

```
destroy(This :: wxMessageDialog()) -> ok
```

Destroys the object.
