From 0d60cffa2e8a2b769ae1ea6099de53afde156086 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 3 Oct 2013 12:12:07 +0000 Subject: [PATCH] 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 --- src/richtext/richtextctrl.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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, -- 2.45.2