class PythonView(CodeEditor.CodeView):
+ def GetCtrlClass(self):
+ """ Used in split window to instantiate new instances """
+ return PythonCtrl
+
+
def ProcessUpdateUIEvent(self, event):
if not self.GetCtrl():
return False
return CodeEditor.CodeView.ProcessUpdateUIEvent(self, event)
- def GetCtrlClass(self):
- """ Used in split window to instantiate new instances """
- return PythonCtrl
-
-
def OnActivateView(self, activate, activeView, deactiveView):
STCTextEditor.TextView.OnActivateView(self, activate, activeView, deactiveView)
if activate:
class PythonCtrl(CodeEditor.CodeCtrl):
- def __init__(self, parent, ID = -1, style = wx.NO_FULL_REPAINT_ON_RESIZE):
- CodeEditor.CodeCtrl.__init__(self, parent, ID, style)
+ def __init__(self, parent, id=-1, style=wx.NO_FULL_REPAINT_ON_RESIZE):
+ CodeEditor.CodeCtrl.__init__(self, parent, id, style)
self.SetProperty("tab.timmy.whinge.level", "1")
self.SetProperty("fold.comment.python", "1")
self.SetProperty("fold.quotes.python", "1")
if doExtraIndent or len(textNoTrailingSpaces) and textNoTrailingSpaces[-1] == ':':
spaces = spaces + ' ' * self.GetIndent()
self.AddText('\n' + spaces)
+ self.EnsureCaretVisible()
# Callback for tokenizer in self.DoIndent