izb
izb

Reputation: 51761

How to change a GtkTreeView style in Python?

I have an app written in python that presents some of its data in a tree view. By default, the tree view is a floaty white affair with little floaty triangles to expand the nodes.

Is it possible to change this style to be more like a Windows explorer tree view? Specifically, I'd like to have vertical lines indicating parentage of the nodes.

If this is possible, how would it be done?

Upvotes: 2

Views: 1594

Answers (2)

Isaiah
Isaiah

Reputation: 4309

For lines linking the arrows there is a method in gtk.TreeView for that, see http://library.gnome.org/devel/pygtk/stable/class-gtktreeview.html#method-gtktreeview--set-enable-tree-lines

Upvotes: 3

b3rx
b3rx

Reputation: 366

you need to create a custom CellRenderers for this. the below links might help.

http://www.pygtk.org/pygtk2tutorial/ch-TreeViewWidget.html

http://www.pygtk.org/pygtk2tutorial/sec-CellRenderers.html

Upvotes: 1

Related Questions