diff --git a/wxPython/demo/run.py b/wxPython/demo/run.py index 8cab420bb4..c58a9a86f0 100755 --- a/wxPython/demo/run.py +++ b/wxPython/demo/run.py @@ -47,7 +47,8 @@ class RunDemoApp(wxApp): # its own top-level window if win: # so set the frame to a good size for showing stuff - frame.SetSize((600, 450)) + frame.SetSize((640, 480)) + win.SetFocus() else: # otherwise the demo made its own frame, so just put a diff --git a/wxPython/demo/wxStyledTextCtrl_2.py b/wxPython/demo/wxStyledTextCtrl_2.py index 8d1fbd21f7..c2c7ae4855 100644 --- a/wxPython/demo/wxStyledTextCtrl_2.py +++ b/wxPython/demo/wxStyledTextCtrl_2.py @@ -141,14 +141,14 @@ class PythonSTC(wxStyledTextCtrl): styleBefore = self.GetStyleAt(caretPos - 1) # check before - if charBefore and charBefore in "[]{}()" and ord(styleBefore) == 10: + if charBefore and charBefore in "[]{}()" and ord(styleBefore) == SCE_P_OPERATOR: braceAtCaret = caretPos - 1 # check after if braceAtCaret < 0: charAfter = self.GetCharAt(caretPos) styleAfter = self.GetStyleAt(caretPos) - if charAfter and charAfter in "[]{}()" and ord(styleAfter) == 10: + if charAfter and charAfter in "[]{}()" and ord(styleAfter) == SCE_P_OPERATOR: braceAtCaret = caretPos if braceAtCaret >= 0: