From dd9f8154e5d7cbf298510eb4d45a5155e6a2a0b4 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 13 Jun 2007 13:03:12 +0000 Subject: [PATCH] fixing 1736428 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/textctrl.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 96b65dd616..252f08aa56 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1794,11 +1794,18 @@ void wxMacMLTEControl::AdjustCreationAttributes( const wxColour &background, boo options |= kTXNSupportEditCommandProcessing | kTXNSupportEditCommandUpdating - | kTXNSupportSpellCheckCommandProcessing - | kTXNSupportSpellCheckCommandUpdating | kTXNSupportFontCommandProcessing | kTXNSupportFontCommandUpdating; + // only spell check when not read-only + // todo : use system options for the other cases + bool checkSpelling = !(m_windowStyle & wxTE_READONLY); + + if ( checkSpelling ) + options |= + kTXNSupportSpellCheckCommandProcessing + | kTXNSupportSpellCheckCommandUpdating; + TXNSetCommandEventSupport( m_txn , options ) ; } }