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)
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)