Help with GtkCTree widgets



Hi,

I wondered if anyone could possibly help me out. I'm trying to retrieve
the text
associated with a node in a GtkCTree widget. I can do so with a call to
gtk_ctree_get_node_info but not with a call to gtk_ctree_node_get_text.
Here
is the gist of things:

GtkWidget *myTree;
GtkCTreeNode *myNode;
char *nodeText[1] = { "Node" };
char *text;

myTree = gtk_ctree_new(1, 0);
myNode = gtk_ctree_insert_node(GTK_CTREE(myTree), NULL, NULL,
                                                    nodeText, 0, NULL,
NULL, NULL,
                                                    NULL, FALSE, FALSE);

/* This works */

gtk_ctree_get_node_info(GTK_CTREE(myTree), myNode, &text, 0,
                                       NULL, NULL, NULL, NULL, FALSE,
FALSE);

/* But this doesn't */

gtk_ctree_node_get_text(GTK_CTREE(myTree), myNode, 0, &text);

Does anyone know why my call to gtk_ctree_node_get_text fails? Any
help would be much appreciated.

Many thanks






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