diff --git a/utils/wxPython/demo/wxStyledTextCtrl_2.py b/utils/wxPython/demo/wxStyledTextCtrl_2.py index dbfbb714d4..e1d803105b 100644 --- a/utils/wxPython/demo/wxStyledTextCtrl_2.py +++ b/utils/wxPython/demo/wxStyledTextCtrl_2.py @@ -118,6 +118,21 @@ class PythonSTC(wxStyledTextCtrl): self.StyleSetSpec(34, "fore:#FFFFFF,back:#0000FF,bold") self.StyleSetSpec(35, "fore:#000000,back:#FF0000,bold") + EVT_KEY_UP(self, self.OnKeyPressed) + + + def OnKeyPressed(self, event): + key = event.KeyCode() + if key == 32 and event.ControlDown(): + pos = self.GetCurrentPos() + # Tips + if event.ShiftDown(): + self.CallTipSetBackground("yellow") + self.CallTipShow(pos, 'param1, param2') + # Code completion + else: + self.AutoCompShow('I love wxPython a b c') + def OnUpdateUI(self, evt): @@ -148,8 +163,10 @@ class PythonSTC(wxStyledTextCtrl): self.BraceBadlight(braceAtCaret) else: self.BraceHighlight(braceAtCaret, braceOpposite) - self.SetCurrentPosition(braceOpposite) - self.SetCurrentPosition(caretPos) + #pt = self.PointFromPosition(braceOpposite) + #self.Refresh(true, wxRect(pt.x, pt.y, 5,5)) + #print pt + #self.Refresh(false) def OnMarginClick(self, evt): diff --git a/utils/wxPython/distrib/autobuild.py b/utils/wxPython/distrib/autobuild.py index 8b7a0a9638..bdfa3fc05b 100644 --- a/utils/wxPython/distrib/autobuild.py +++ b/utils/wxPython/distrib/autobuild.py @@ -162,7 +162,7 @@ FINAL=1 # #*#*#*#*#* Comment this out to allow upload... - return + ##return logSeparator("Uploading to website...") do('python c:\\utils\\sendwxp.py %s' % destName) @@ -175,7 +175,7 @@ FINAL=1 logSeparator("Finished!!!") finally: -## os.system("list " + logfile) + os.system("list " + logfile) pass diff --git a/utils/wxPython/modules/stc/stc_.i b/utils/wxPython/modules/stc/stc_.i index 38a8f83d6b..659b5e21c3 100644 --- a/utils/wxPython/modules/stc/stc_.i +++ b/utils/wxPython/modules/stc/stc_.i @@ -67,8 +67,8 @@ def EVT_STC_DOUBLECLICK(win, id, fn): def EVT_STC_MODIFIED(win, id, fn): win.Connect(id, -1, wxEVT_STC_MODIFIED, fn) -def EVT_STC_CMDKEY(win, id, fn): - win.Connect(id, -1, wxEVT_STC_CMDKEY, fn) +def EVT_STC_KEY(win, id, fn): + win.Connect(id, -1, wxEVT_STC_KEY, fn) def EVT_STC_MACRORECORD(win, id, fn): win.Connect(id, -1, wxEVT_STC_MACRORECORD, fn) diff --git a/utils/wxPython/modules/stc/stc_.py b/utils/wxPython/modules/stc/stc_.py index e7c76c47c4..e905e33cbb 100644 --- a/utils/wxPython/modules/stc/stc_.py +++ b/utils/wxPython/modules/stc/stc_.py @@ -62,8 +62,8 @@ def EVT_STC_DOUBLECLICK(win, id, fn): def EVT_STC_MODIFIED(win, id, fn): win.Connect(id, -1, wxEVT_STC_MODIFIED, fn) -def EVT_STC_CMDKEY(win, id, fn): - win.Connect(id, -1, wxEVT_STC_CMDKEY, fn) +def EVT_STC_KEY(win, id, fn): + win.Connect(id, -1, wxEVT_STC_KEY, fn) def EVT_STC_MACRORECORD(win, id, fn): win.Connect(id, -1, wxEVT_STC_MACRORECORD, fn)