]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxStyledTextCtrl_2.py
Patch 559673 and 561053
[wxWidgets.git] / wxPython / demo / wxStyledTextCtrl_2.py
index c5dfd8af7a8f0df89a05694f0556335df1f5a226..ee705e4c2632136eaa42517f0872224247009928 100644 (file)
@@ -136,6 +136,8 @@ class PythonSTC(wxStyledTextCtrl):
 
 
     def OnKeyPressed(self, event):
+        if self.CallTipActive():
+            self.CallTipCancel()
         key = event.KeyCode()
         if key == 32 and event.ControlDown():
             pos = self.GetCurrentPos()
@@ -331,13 +333,9 @@ be helpful.
 
 
 if __name__ == '__main__':
-    import sys
-    app = wxPySimpleApp()
-    frame = wxFrame(None, -1, "Tester...", size=(640, 480))
-    win = runTest(frame, frame, sys.stdout)
-    frame.Show(true)
-    app.MainLoop()
-
+    import os
+    import run
+    run.main(['', os.path.basename(__file__)])