Re: Notification of row expansion and row collapsed in GtkTreeView



Le 11/06/01 12:44:21, Padraig O'Briain a écrit :
> I am trying to obtain notification of when a row in a GtkTreeView is
> expanded or collapsed. I have found the signals "expand_row" and
> "collapse_row".
> 
> However, it seems to me that these signals are emitted before the row is 
> actually expanded or collapsed. Is there a reason why this signal could
> not be emitted after the actual expansion or collapse?

Imagine a tree view of a file system. You'll use empty children for each
directory to make them having an expander arrow. When the row is expanded,
you remove the empty child, scan the directory, and insert children for
each file and directory in it.
You need to receive the signal before the actual expansion.

> If I want to be notified after the actual expansion, do I need a new
> signals in GtkTreeView or can I call gtk_idle_add() in the signal
> handler for say, expand_row, to ensure that the row is actually expanded?

Maybe there is a solution using expose events...

Tom.




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