Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tselection = tree_view.get_selection()
tselection.connect("changed", self.cb_selection_changed)
tselection.set_mode(Gtk.SelectionMode.BROWSE)
cr = Gtk.CellRendererText()
tvc = Gtk.TreeViewColumn(None, cr, text=0)
tree_view.append_column(tvc)
tselection.select_path(0,) # select first item
return sw
if __name__ == '__main__':
app = Window()
app.connect('destroy', Gtk.main_quit)
app.show_all()
Gtk.main()
def __init__(self, title=None):
super(Window, self).__init__()
self.set_default_size(self.WIDTH, self.HEIGHT)
self.da = Gtk.DrawingArea()
self.da.connect('draw', self.da_draw_event)
def put_in_frame(widget):
frame = Gtk.Frame(label=None)
frame.set_property('shadow_type', Gtk.ShadowType.IN)
frame.add(widget)
return frame
self.current_snippet = None
vpaned = Gtk.VPaned()
self.add(vpaned)