Displaying children in a gtk.TreeModelFilter



disclaimer : I'm using GTK in Python with Pygtk. I've sent this email to pygtk mailing list but I believe it could be of interest in a  broader GTK audience.



Hello,

I'm currently working closely with gtk.TreeModelFilter and I'm currently stuck.

I've discovered that in order to have a row visible, that row has to return True against the visible_func but, also, that *all his parents have to be visible*.

This is rather important and not written in any GTK documentation I've seen (maybe I should send a patch against pygtk doc for that).


As I consequence, I'm currently looking for a way to display children that have an hidden parent. That children would be displayed at the root.

For example :

a
--> b
------->c
---------->d
 (d is child of c which is child of b which is child of b)
if b is not visible, my tree would display :

a
c
-->d


(currently, it only display "a").


How can I do that with my treemodelfilter ? It seems for me a rather important usecase for a treemodelfilter but I cannot find any documentation or code sample on the web about a way of doing that.

Thanks in advance for help or any useful input on this.


Lionel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]