With GTK3 some Treeviews (I presume) have a few buttons at the bottom that appear to be part of it. The System Settings in Ubuntu uses this, as well as the File Selector dialog for GTK3 apps
Is this a part of GTK3 or just a specially made container?
In case anyone else comes here, the buttons are ToolButtons in a Toolbar with the "inline-toolbar" class
self.listTools=Gtk.Toolbar()
self.listTools.set_property("icon_size",1)
context=self.listTools.get_style_context()
context.add_class("inline-toolbar")
self.addButton=Gtk.ToolButton()
self.addButton.set_property("visible",True)
self.addButton.set_property("can_focus",False)
self.addButton.set_property("use_action_appearance",False)
self.addButton.set_property("use_underline",False)
self.addButton.set_property("icon_name","list-add-symbolic")
self.listTools.add(self.addButton)
I'm not sure if all the button specific properties are necessary
I packed the treeview above the toolbar an a ScrolledWindow and gave it these properties
scrolled_window = Gtk.ScrolledWindow()
scrolled_window.add_with_viewport(self.objectsView)
scrolled_window.set_property("shadow_type","in")
Then finally I packed the ScrolledWindow above the Toolbar in a VBox
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With