editors/TextViewer.py
changeset 2177 10aa87518401
parent 1904 7dd49b65208b
child 2409 00d90ab8a462
equal deleted inserted replaced
2176:748017ca4151 2177:10aa87518401
    76 
    76 
    77 
    77 
    78 class TextViewer(EditorPanel):
    78 class TextViewer(EditorPanel):
    79 
    79 
    80     ID = ID_TEXTVIEWER
    80     ID = ID_TEXTVIEWER
    81 
       
    82     if wx.VERSION < (2, 6, 0):
       
    83         def Bind(self, event, function, id=None):
       
    84             if id is not None:
       
    85                 event(self, id, function)
       
    86             else:
       
    87                 event(self, function)
       
    88 
    81 
    89     def _init_Editor(self, prnt):
    82     def _init_Editor(self, prnt):
    90         self.Editor = CustomStyledTextCtrl(id=ID_TEXTVIEWERTEXTCTRL,
    83         self.Editor = CustomStyledTextCtrl(id=ID_TEXTVIEWERTEXTCTRL,
    91                                            parent=prnt, name="TextViewer", size=wx.Size(0, 0), style=0)
    84                                            parent=prnt, name="TextViewer", size=wx.Size(0, 0), style=0)
    92         self.Editor.ParentWindow = self
    85         self.Editor.ParentWindow = self