Apparently the "proper" way to have items in a GTKListBox or Treeview is constructing with a listStore model, in the constructor. What if I want to use Glade GUI project, in which a list box is already created, and referenced by builder.get_object("appsDocumentListBox")
?
Can I set the model after Gtk.builder created the window, or is there a better way to do this?
I'm also wondering what the performance improvement is of using the ListStore vs manually adding with row = Gtk.ListBoxRow()
, adding contents and setting ListBox.add(row)
? (which does work from a Glade-builder Python window)
Unlike Treeview, apparently Listbox won't set a model after constructor?
>>> l = Gtk.ListBox()
>>> l.set_model
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'ListBox' object has no attribute 'set_model'