]>
git.datanom.net - lensdatabase.git/blob - textview.py
6502cccd5d549ff1ac99d0db2b514a4f076a15d6
2 gi
.require_version("Gtk", "3.0")
3 from gi
.repository
import Gtk
7 self
.scrolledWindow
= Gtk
.ScrolledWindow()
8 self
.scrolledWindow
.set_hexpand(True)
9 self
.scrolledWindow
.set_vexpand(True)
10 self
.textview
= Gtk
.TextView()
11 self
.textview
.set_wrap_mode(Gtk
.WrapMode
.WORD
)
12 self
.scrolledWindow
.add(self
.textview
)
14 def getScrolledWindow(self
):
15 return self
.scrolledWindow
17 def getTextview(self
):
21 textbuffer
= self
.textview
.get_buffer()
22 start
= textbuffer
.get_start_iter()
23 end
= textbuffer
.get_end_iter()
24 return textbuffer
.get_text(start
, end
, False)
26 def setText(self
, text
):
27 textbuffer
= self
.textview
.get_buffer()
28 textbuffer
.set_text(text
)
This page took 0.108481 seconds and 6 git commands to generate.