]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxStyledTextCtrl_2.py
Removed --use-temp-file removed from makeg95.env
[wxWidgets.git] / wxPython / demo / wxStyledTextCtrl_2.py
index 54b83aa2d2a86900cc29f06d646d3777c3137069..51a14386bd363c838a70f0a7acaf46449e13f5fc 100644 (file)
@@ -116,7 +116,7 @@ class PythonSTC(wxStyledTextCtrl):
 
         self.SetCaretForeground("BLUE")
 
-        EVT_KEY_UP(self, self.OnKeyPressed)
+        EVT_KEY_DOWN(self, self.OnKeyPressed)
 
 
     def OnKeyPressed(self, event):
@@ -135,9 +135,20 @@ class PythonSTC(wxStyledTextCtrl):
                 #st = string.join(lst)
                 #print len(st)
                 #self.AutoCompShow(0, st)
-                self.AutoCompSetIgnoreCase(true)
-                self.AutoCompShow(0, string.join(keyword.kwlist))
-                self.AutoCompSelect('br')
+
+                kw = keyword.kwlist[:]
+                kw.append("zzzzzz")
+                kw.append("aaaaa")
+                kw.append("__init__")
+                kw.append("zzaaaaa")
+                kw.append("zzbaaaa")
+                kw.append("this_is_a_longer_value")
+                kw.append("this_is_a_much_much_much_much_much_much_much_longer_value")
+
+                kw.sort()  # Python sorts are case sensitive
+                self.AutoCompSetIgnoreCase(false)  # so this needs to match
+
+                self.AutoCompShow(0, string.join(kw))
         else:
             event.Skip()