can we change the text of a tree item ?



hi group,,
  i have created a gtktree item using a
       item = gtk_tree_item_new_with_label ("item" )
call..
( gtk 1.2)
 now ,
 i don't see any entry points in the api to change the label of the item..

I went through the source code  and find that.. item is a container..
struct _GtkContainer
{
 GtkWidget widget;
..
..

};
and the call  -----  gtk_tree_item_new_with_label
is implemented by
 tree_item = gtk_tree_item_new ();
 label_widget = gtk_label_new (label);
 gtk_container_add (GTK_CONTAINER (tree_item), label_widget);

i tried to change the label by ..
gtk_label_set_text(GTK_LABEL( & (GTK_CONTAINER(current_ledger)->widget)),changed_ledger);

but doesn't work..
error i get is..

Gtk-WARNING **: invalid cast from `GtkTreeItem' to `GtkLabel'

please help...


thanks in advance..




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




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