From: Julian Smart Date: Thu, 3 Oct 2013 12:12:07 +0000 (+0000) Subject: Include wxWANTS_CHARS style unless wxTE_READONLY is specified X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0d60cffa2e8a2b769ae1ea6099de53afde156086 Include wxWANTS_CHARS style unless wxTE_READONLY is specified git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 994130d1c5..f639779d11 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -240,6 +240,11 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va const wxValidator& validator, const wxString& name) { style |= wxVSCROLL; + + // If read-only, the programmer probably wants to retain dialog keyboard navigation. + // If you don't, then pass wxWANTS_CHARS explicitly. + if ((style & wxTE_READONLY) == 0) + style |= wxWANTS_CHARS; if (!wxControl::Create(parent, id, pos, size, style|wxFULL_REPAINT_ON_RESIZE,