All the other message box elements were configurable, so why not this one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71213
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// this sizer allows to configure the messages shown in the message box
wxSizer * const
sizerMsgs = new wxStaticBoxSizer(wxVERTICAL, this, "&Messages");
// this sizer allows to configure the messages shown in the message box
wxSizer * const
sizerMsgs = new wxStaticBoxSizer(wxVERTICAL, this, "&Messages");
+ sizerMsgs->Add(new wxStaticText(this, wxID_ANY, "&Title:"));
+ m_textTitle = new wxTextCtrl(this, wxID_ANY, "Test Message Box");
+ sizerMsgs->Add(m_textTitle, wxSizerFlags().Expand().Border(wxBOTTOM));
+
sizerMsgs->Add(new wxStaticText(this, wxID_ANY, "&Main message:"));
m_textMsg = new wxTextCtrl(this, wxID_ANY, "Hello from a box!",
wxDefaultPosition, wxDefaultSize,
sizerMsgs->Add(new wxStaticText(this, wxID_ANY, "&Main message:"));
m_textMsg = new wxTextCtrl(this, wxID_ANY, "Hello from a box!",
wxDefaultPosition, wxDefaultSize,
void TestMessageBoxDialog::OnApply(wxCommandEvent& WXUNUSED(event))
{
void TestMessageBoxDialog::OnApply(wxCommandEvent& WXUNUSED(event))
{
- wxMessageDialog dlg(this, GetMessage(), "Test Message Box", GetStyle());
+ wxMessageDialog dlg(this, GetMessage(), GetTitle(), GetStyle());
PrepareMessageDialog(dlg);
wxString btnName;
PrepareMessageDialog(dlg);
wxString btnName;
void TestRichMessageDialog::OnApply(wxCommandEvent& WXUNUSED(event))
{
void TestRichMessageDialog::OnApply(wxCommandEvent& WXUNUSED(event))
{
- wxRichMessageDialog dlg(this, GetMessage(), "Test Rich Message Dialog",
- GetStyle());
+ wxRichMessageDialog dlg(this, GetMessage(), GetTitle(), GetStyle());
PrepareMessageDialog(dlg);
dlg.ShowCheckBox(m_textCheckBox->GetValue(),
PrepareMessageDialog(dlg);
dlg.ShowCheckBox(m_textCheckBox->GetValue(),
bool Create();
protected:
bool Create();
protected:
+ wxString GetTitle() { return m_textTitle->GetValue(); }
wxString GetMessage() { return m_textMsg->GetValue(); }
long GetStyle();
wxString GetMessage() { return m_textMsg->GetValue(); }
long GetStyle();
+ wxTextCtrl *m_textTitle,
+ *m_textMsg,
*m_textExtMsg;
wxCheckBox *m_buttons[Btn_Max];
*m_textExtMsg;
wxCheckBox *m_buttons[Btn_Max];