Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from gi.repository import Gtk
- win = Gtk.Window()
- win.connect('destroy', Gtk.main_quit)
- grid = Gtk.Grid()
- entry1 = Gtk.Entry()
- entry2 = Gtk.Entry()
- button1 = Gtk.Button('Button1')
- button2 = Gtk.Button('Button2')
- button3 = Gtk.Button('Button3')
- button4 = Gtk.Button('Button4')
- buttons_vbox = Gtk.VBox()
- buttons_vbox.set_spacing(10)
- buttons_vbox.set_margin_top(5)
- #buttons_vbox.pack_start(button1, 0, 0, 0)
- #buttons_vbox.pack_start(button2, 0, 0, 0)
- buttons_vbox.pack_start(button3, 0, 0, 0)
- buttons_vbox.pack_start(button4, 0, 0, 0)
- sw_child = Gtk.Table()
- sw_child.set_size_request(300, 300)
- sw = Gtk.ScrolledWindow()
- sw.add(sw_child)
- sw.set_vexpand(True)
- grid.set_column_spacing(10)
- grid.set_row_spacing(10)
- grid.set_margin_top(10)
- grid.set_margin_left(10)
- grid.set_margin_right(10)
- grid.set_margin_bottom(10)
- grid.attach(entry1, 0, 0, 1, 1)
- grid.attach(entry2, 0, 1, 1, 1)
- grid.attach(sw, 0, 2, 1, 3)
- grid.attach(button1, 1, 0, 1, 1)
- grid.attach(button2, 1, 1, 1, 1)
- grid.attach(buttons_vbox, 1, 2, 1, 1)
- win.add(grid)
- win.show_all()
- Gtk.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement