Implemented get_wraped_wxString() to wrap the message text inside the MessageDialog and RichMessageDialog
This commit is contained in:
parent
6b83ded669
commit
667842ec8b
3 changed files with 44 additions and 5 deletions
|
@ -89,6 +89,8 @@ public:
|
|||
virtual ~WarningDialog() = default;
|
||||
};
|
||||
|
||||
wxString get_wraped_wxString(const wxString& text_in, size_t line_len = 80);
|
||||
|
||||
#ifdef _WIN32
|
||||
// Generic static line, used intead of wxStaticLine
|
||||
class StaticLine: public wxTextCtrl
|
||||
|
@ -283,7 +285,7 @@ public:
|
|||
const wxString& message,
|
||||
const wxString& caption = wxEmptyString,
|
||||
long style = wxOK)
|
||||
: wxMessageDialog(parent, message, caption, style) {}
|
||||
: wxMessageDialog(parent, get_wraped_wxString(message), caption, style) {}
|
||||
~MessageDialog() {}
|
||||
};
|
||||
|
||||
|
@ -295,7 +297,7 @@ public:
|
|||
const wxString& message,
|
||||
const wxString& caption = wxEmptyString,
|
||||
long style = wxOK)
|
||||
: wxRichMessageDialog(parent, message, caption, style) {
|
||||
: wxRichMessageDialog(parent, get_wraped_wxString(message), caption, style) {
|
||||
this->SetEscapeId(wxID_CANCEL);
|
||||
}
|
||||
~RichMessageDialog() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue