user interface - How to create sidebar in GTK+3 (Python)? -
i'm new gtk+3 (i utilize pygobject) , need create sidebar has construction this:
header 1 subheader 1 subheader 2 header 2 subheader 3 subheader 4
what examples can larn from? show me minimal working illustration of how utilize gtk.treeview
, gtk.treemodel
(not using gtk.builder()
)?
besides using xml file , gtk.builder()
describe layout seems superior creating construction in python file, there seems much less documentation doing so.
my current ui description:
<?xml version="1.0" encoding="utf-8"?> <interface> <object class="gtkwindow" id="main-window"> <property name="title">applicationname</property> <signal name="delete-event" handler="ondeletewindow"/> <child> <object class="gtkbox" id="container"> <property name="orientation">horizontal</property> <child> <object class="gtktreeview" id="sidebar"> </object> </child> <child> <object class="gtkbox" id="right-container"> <property name="orientation">vertical</property> <child> <object class="gtkbuttonbox" id="top-buttonbox"> <child> <object class="gtkbutton" id="add-button"> <property name="label">add</property> </object> </child> <child> <object class="gtkbutton" id="delete-button"> <property name="label">delete</property> </object> </child> </object> </child> </object> </child> </object> </child> </object> </interface>
you should have @ gtktreeview
, associated tree-like info model gtktreestore
. python gtk+ 3.0 tutorial introduction.
user-interface gtk gtk3 pygobject
No comments:
Post a Comment