Re: [gtk-list] How to change a label in a GtkTree?



>From the GTk reference docs :
void        gtk_ctree_node_set_text         (GtkCTree *ctree,
                                               GtkCTreeNode *node,
                                               gint column,
                                               const gchar *text);



Set the text in a node.

Quentin Delamarre wrote:
> 
> Hi,
> 
> I have one GtTree with lots of labels and subtrees (GtkTreeItem),
> and I would like to change the text of the label of the items.
> 
> For example, in the following tree:
> 
> [-]-+-- Root
>    [-]-+-- Label 1
>     |  +------ Label 2
>     +----- Label 3
> 
> I would like to change the text "Label 2" to "Label 4".
> 
> I've got the GtkTreeItem corresponding, created by the function:
> item = gtk_tree_item_new_with_label("Label 2");
> 
> And my question is:
> 
> how to change the text of the label from the item ?
> 
> I couldn't find any answer in the doc/tutorial/source...
> 
> Thanks in advance,
> 
>   Quentin.
> 
> --
> ==================================================================
> Quentin Delamarre  --  projet RobotVis  --  INRIA Sophia-Antipolis
> email: mailto:Quentin.Delamarre@sophia.inria.fr           (France)
> URL: http://www.inria.fr/robotvis/personnel/qdelam/qdelam-eng.html
> ==================================================================
> 
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



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