Пример #1
0
 def __init__(self):
     ScrolledWindow.__init__(self)
     MDSplusWidget.__init__(self)
     tv = TextView()
     tv.set_wrap_mode(WRAP_WORD)
     self.buffer = tv.get_buffer()
     self.add(tv)
Пример #2
0
 def __init__(self):
     ScrolledWindow.__init__(self)
     MDSplusWidget.__init__(self)
     tv = TextView()
     tv.set_wrap_mode(WRAP_WORD)
     self.buffer = tv.get_buffer()
     self.add(tv)
Пример #3
0
 def __init__(self, name='TemplateEditor'):
     TextView.__init__(self)
     self.set_name(name)
     self.buffer = TextTemplate(name=name)
     self.set_buffer(self.buffer)
     self.dialogs = {}.fromkeys(['create', 'preview'])
     self.set_editable(True)
     self.show()
Пример #4
0
 def __init__(self, name="TemplateEditor"):
     TextView.__init__(self)
     self.set_name(name)
     self.buffer = TextTemplate(name=name)
     self.set_buffer(self.buffer)
     self.dialogs = {}.fromkeys(["create", "preview"])
     self.set_editable(True)
     self.show()
Пример #5
0
 def __init__(self, cfg=None, name='TemplateEditor'):
     TextView.__init__(self)
     self.cfg = cfg
     self.set_name(name)
     self.buffer = TextTemplate(name=name)
     self.set_buffer(self.buffer)
     self.dialogs = {}.fromkeys(['create', 'preview'])
     self.set_editable(True)
     self.show()
Пример #6
0
 def __init__(self, text, font=None, name='TextScroll'):
     ScrolledWindow.__init__(self)
     self.set_name(name)
     self.tview = TextView()
     self.tview.set_name(name)
     self.tbuffer = self.tview.get_buffer()
     self.add(self.tview)
     self.tview.set_editable(0)
     self.tview.set_wrap_mode(WRAP_WORD)
     self.tbuffer.set_text(text)
     self.tview.show()
     self.show()
Пример #7
0
class TextScroll(ScrolledWindow):
    def __init__(self, text, font=None, name='TextScroll'):
        ScrolledWindow.__init__(self)
        self.set_name(name)
        self.tview = TextView()
        self.tview.set_name(name)
        self.tbuffer = self.tview.get_buffer()
        self.add(self.tview)
        self.tview.set_editable(0)
        self.tview.set_wrap_mode(WRAP_WORD)
        self.tbuffer.set_text(text)
        self.tview.show()
        self.show()

    def set_text(self, text):
        self.tbuffer.set_text(text)