[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: Has anyone been able to force TreeView expander with no children?
From:       Shaun McCance <shaunm () gnome ! org>
Date:       2009-10-15 16:24:54
Message-ID: 1255623894.10253.165.camel () localhost ! localdomain
[Download RAW message or body]

On Wed, 2009-10-14 at 18:52 -0700, Daniel B. Thurman wrote:
> I have a FileViewer application that I am working on
> and so far I have not been able to force expanders
> on TreeView when there are only "top-level"
> directories/files populated in the TreeStore.
> 
> You would think that doing something simple as:
> [...]
> self.treestore = gtk.TreeStore(str, gtk.gdk.Pixbuf, str)
> self.treeview = gtk.TreeView(self.treestore)
> self.treeview.set_show_expanders(True)
> self.path = os.path.expanduser('~')
> self.populate_treestore(path=self.path, recurse=0)
> [...]
> 
> Would force the TreeView to show the expanders,
> but I have not been able to get this to work.  I need
> the expanders so that when I expand the directory
> in question, I would then trigger a call to add more
> children, and so on.

If you want to populate data on-demand like this,
you're probably going to have to write your own
GtkTreeModel.

--
Shaun


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic