#!/usr/bin/env python

import gtk

def main():

	t = gtk.TreeView()

	r1 = gtk.CellRendererText()
	print "CellRendererText xalign is %f", r1.get_property("xalign")
	r1.set_property("xalign", 0.5)
	t.insert_column_with_attributes(-1, "The first column", r1, text=0)
	t.get_column(0).set_expand(True)

	r2 = gtk.CellRendererText()
	t.insert_column_with_attributes(-1, "The second column", r2, text=0)
	t.get_column(1).set_expand(True)

	l = gtk.ListStore(str)
	l.append( ["one"]  )
	t.set_model(l)

	w = gtk.Window()
	w.set_property('width-request', 600)
	w.add(t)

	w.show_all()

	gtk.main()

if __name__ == '__main__':
	main()
