blob: 47cf776edab300822da9532cac4ddf699b5ae873 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/usr/bin/env python
from gi.repository import Gtk
def main():
window = Gtk.Window()
window.set_default_size(400, 400)
tv1 = Gtk.TextView()
tv2 = Gtk.TextView()
label = Gtk.Label()
label.set_text('Separator')
sw1 = Gtk.ScrolledWindow()
sw1.add(tv1)
sw2 = Gtk.ScrolledWindow()
sw2.add(tv2)
container = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
container.pack_start(sw1, True, True, 0)
container.add(label)
container.pack_start(sw2, True, True, 0)
sw3 = Gtk.ScrolledWindow()
sw3.add(container)
window.add(sw3)
window.connect("destroy", Gtk.main_quit)
window.show_all()
Gtk.main()
if __name__ == "__main__":
main()
|