1

As far as GTK is concern, the tree created is like this:

The code for this tree is obtained from here.

What I want to achieve is this:

This is from Eclipse. Most programs have the lines for trees as well. Those lines are necessary for me as my program will have a large tree.

gpoo
  • 8,408
  • 3
  • 38
  • 53
elwc
  • 1,197
  • 2
  • 15
  • 25

1 Answers1

2

You can enable these dashed lines with gtk_tree_view_set_enable_tree_lines. So, for Python you would simply call

treeview.set_enable_tree_lines(True)
matthias
  • 2,161
  • 15
  • 22
  • This is seriously awesome! Shame that I did not notice this method. One more question: So it's not possible to join the "nodes" like how Eclipse (and other softwares) does it? – elwc Dec 20 '12 at 08:53
  • What do you mean by joining? For a specific look and feel, I cannot really help as I don't have a Windows machine available. – matthias Dec 20 '12 at 09:02
  • The solution you gave drew lines from parent to child. But the lines do not connect from parent to parent as shown in the image above. e.g. Lines available from Ubuntu to http://www.ubuntu.com. But lines not there from Ubuntu to Fedora. I hope this is clear. – elwc Dec 20 '12 at 09:18
  • You can only influence whether to draw horizontal, vertical or both lines. You should file a bug upstream if this is important to you. – matthias Dec 20 '12 at 09:30
  • Ahhhh....Okay I will be satisfied with what I can do and accept this as an answer for now. – elwc Dec 20 '12 at 09:39