#+BEGIN_COMMENT
.. title: GTK-3 Treeview in liststore mode
.. slug: 09-treeview-liststore-mode
.. date: 2014-04-12 12:00:00 UTC
.. tags: GTK-3, python, widgets
.. category: python
.. description: Example of using a treeview, the treeview display can be adjusted using different store models in this case we use the liststore model.
.. type: text
#+END_COMMENT

#+CAPTION: Calendara & menus 
[[../../../images/gtk/tut08-menu-calendar.png]]

#append this to module path so we can load from the parent directory
import sys, os
from scaffold import web
from scaffold.loaders import load, load_partial


class page:
    name = __name__
    title = 'GTK3 Treeview in liststore mode'
    tags = 'GTK3', 'Python', 'liststore', 'treeview'
    intro = 'Example of using a treeview, the treeview display can be adjusted using different store models in this case we use the liststore model.'
    date = '2014-04-12'
    path = os.path.abspath('./')
    image = web.template.path_image + '/gtk/tut09-treeview-listview.png'

    def create_content(self):
        web.images.create(self.image, title='GTK Window')
        web.page.section(
            web.div.create(
                web.images.render()
            ).set_classes('sources').render()
        )

        web.paragraph.create("The below example demonstrates using the treeview to display table style data, it generates a few rows and shows row selection from a mouse click.")
        web.page.section(web.paragraph.render())

        web.pre.create(load(os.path.abspath('./content/gtk3/tut09/tut09-treeview-listview.py')))
        web.page.section(web.pre.render())

