Simple example of a gtk Image in a TreeView


TreeView

treeview imageHere is a super simple example of a pixbuf in a treeview.

The pixbuf is loaded from a file, then set in a treeviewcolumn with a cellrenderer. The column is appended to the treeview. It’s all contained in the init of one class to make it short and simple.

Style

There are many ways to write this class. This is only one of those ways. There are several style guides out there, but none of them are (or should be considered) strict rule sets you must code by.

You should play around and experiment with different attributes and layouts before deciding which method is the best for you.


Posted on May 30th, by admica in python.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">