Re: Weird behaviour of GtkCTree



Louise Miller - Sun Microsystems Ireland - Computer Systems - Engineer <Louise Miller Sun COM> writes:

> Hi,
> 
> I am writing an application with GtkCTree.
> 
> What I want the GtkCTree to do is :
> 
> When a parent node is selected, all the children of that node should also
> be selected, i.e turn blue etc.
> 
> However I only seem to get this to work on certain situations : 
> 
> If I select nodes using the up/down arrow keys - works
> If I single-click a collapsed parent node and then expand it - works
> 
> Situations it doesnt work: 
> 
> If I single-click an expanded parent node, the child node doesnt turn blue.
> If I double-click a collapsed parent node, causing it to expand, child node isnt 
> blue
> 
> 
> 
> I edited a ctree example i found to illustrate the problem, its attached if 
> anyone wants to try it out.
> 
> Is there something I am missing out or is this a problem with GtkCTree?
> Would really appreciate the help

Trying to get the GtkCTree to do unusual things is often a considerable
exercise in frustration. This is one of the reasons it is being
replaced in GTK+-2.0 with GtkTreeView. Trying to monitor the
selection via ::select_row is in fact notoriously unreliable

gtk-devel-list is really about the development of GTK+ itself, not 
about the development of applications using GTK+. If you post
to gtk-app-devel-list gnome org, you may find someone on there
who has managed to trick the GtkCTree to do what you want it
to do.

We would be interested to hear if there are things that are hard
to do with GtkTreeView, since those are things we have some chance
of fixing at this point. 

I don't know if using GtkTreeView is possible for you at this point
... porting Nautilus to GTK+-2.0 should start in the next week or two,
but it's hard to predict when it will get to a workable state.
If it is, then I'd really suggest using that instead of GtkCTree.

 - It's better designed
 - It's more likely to be fixed
 - It needs testing.

Regards,
                                        Owen




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