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



Quentin Delamarre wrote:
> 
> 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.
> >
> 
> Ok, I just found an answer to my question:
> 
> the following expression:
>  ((GtkLabel *)  ((GtkBin *) My_tree_item)->child)->label
> is pointing to a gchar* which is the text of the label of the item
> My_tree_item.


Hi, the following code works. It changes the label of a treeitem:

gtk_label_set_text(GTK_LABEL(GTK_BIN(My_tree_item)->child),
"New Label");

Bye,

  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
==================================================================



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