Re: [gtk-list] Re: GtkCTree question




Hi Michael!

On Tue, Jul 21, 1998 at 01:22:21PM +0200, Michael Lausch wrote:

> Now another question (and i will summarize the answers and put them in 
> _any_ document, if somebody can tell me which document i should update 
> and who will accept these patches)

Stefan made a bit of documentation in gtk+/docs/gtk.texi, feel free
to update/extend it. ;)

> Which signals are emitted by a CTree, and which signal should i handle 
> to expand or collapse a node.

There're six signals at the moment :
tree_select_row, tree_unselect_row, tree_expand, tree_collapse, tree_move,
change_focus_row_expansion.

tree_expand and tree_collapse signals are send whenever a node is expanded/
collapsed.  

> Now i'm, hooking the button_press_event and in the handling function i 
> do:
> 
> gtk_clist_get_selection_info(GTK_CLIST(ctree), event->x, event->y,&row, &col);
> node = g_list_nth(GTK_CLIST(ctree)->row_list, row);
> if (!node)
>   return;
> ..........

That's not enough, because of 'change_focus_row_expansion'.
 
> Isn't there a more convenient way? I tried `tree-expand' but this
> signal was never emitted.

For me it works fine....

bye,
  Lars



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