Re: Manually focusing a ctree node?



Richard Harvey Chapman a écrit :
> 
> Summary: How can I set which node has the focus?
> 
> Under the extended selection mode for a ctree:
> 
> Select 2 or more nodes.
> Hold down Ctrl and deselect one item.
> The item is deselected but holds the focus.
> 
> I think this may be confusing for my users since I immediately update the
> configuration page (that goes with the ctree) to reference the next
> selected item in the selection list. Of course, the change only occurs if
> the item deselected was the first item in the selection list.
> 
> How can I set which node has the focus?
> 
May this help
  ret = gtk_clist_get_selection_info (&(GTK_CTREE (ctree)->clist),
                                      ev->button.x, ev->button.y, &i,
&j);
  node_courant = gtk_ctree_node_nth (GTK_CTREE (ctree), (guint)i);
  ret = gtk_ctree_node_get_pixtext (GTK_CTREE (ctree), 
                                    GTK_CTREE_NODE (node_courant), j,
                                    &name, NULL, NULL, NULL);
  key = gtk_ctree_node_get_row_data (GTK_CTREE (ctree), 
                                     GTK_CTREE_NODE (node_courant));

-- 
Florent DEVIN




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