diff --git a/samples/text/text.cpp b/samples/text/text.cpp index 4a9fd1d33a..44a680b125 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -1209,20 +1209,23 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) m_enter->SetClientData(const_cast(static_cast(wxS("enter")))); #if wxUSE_SPELLCHECK + (*m_enter) << "\n"; + // Enable grammar check just for demonstration purposes (note that it's // only supported under Mac, but spell checking will be enabled under the // other platforms too, if supported). If we didn't want to enable it, we // could omit the EnableProofCheck() argument entirely. if ( !m_enter->EnableProofCheck(wxTextProofOptions::Default().GrammarCheck()) ) { - wxMessageDialog error(this, - wxT("Spell checking is not available on this platform or control style."), - wxT("Spell checker error"), - wxOK | wxCENTER | wxICON_ERROR); - error.ShowModal(); + (*m_enter) << "Spell checking is not available on this platform, sorry."; } else - (*m_enter) << wxT("\nSpell checking is enabled, try typing a misspelled word..."); + { + // Break the string in several parts to avoid misspellings in the sources. + (*m_enter) << "Spell checking is enabled, mis" + "s" + "spelled words should be highlighted."; + } #endif m_textrich = new MyTextCtrl(this, wxID_ANY, "Allows more than 30Kb of text\n"