More STC fixes. The demo now shows Calltips and AtuoComplete
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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):
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user