]> git.saurik.com Git - wxWidgets.git/commitdiff
Include wxWANTS_CHARS style unless wxTE_READONLY is specified
authorJulian Smart <julian@anthemion.co.uk>
Thu, 3 Oct 2013 12:12:07 +0000 (12:12 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 3 Oct 2013 12:12:07 +0000 (12:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 994130d1c5027164421a49efab1f033dfff839b1..f639779d11c0c032b24452c7b5ec23a1e6e3422a 100644 (file)
@@ -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,