gtk_ctree_node_get_text() not obtains text in the column
- From: José Antonio Caminero Granja <JCamGra teleline es>
- To: gtk-list redhat com
- Subject: gtk_ctree_node_get_text() not obtains text in the column
- Date: Wed, 02 Aug 2000 23:27:08 +0200
Hello to everybody,
I am not suscribed to the list, so you have to replay to me (and if you
want to the list).
I have a Red Hat 6 with gtk updated to version 1.2.6.
My problem is:
I am using GtkCTree, and when I use gtk_ctree_node_get_text() function
only works in columns where not is the tree. In the other hand, when I
test if cell type I obtain GTK_CELL_TEXT, but is NULL!!.
I want to know if this is a bug or I am doing something wrong.
Thanks for helping me.
Relationated code is:
#include <gtk/gtk.h>
static void tree_select_row (GtkCTree* ctree, GList* node, gint column,
gpointer data)
{
char* text = NULL;
gtk_ctree_node_get_text (ctree, GTK_CTREE_NODE (node), column,
&text);
g_print ("Column: %d, Text: %s\n", column, text);
/* Here system ever prints 1: GTK_CELL_TEXT
g_print ("%d\n", (GTK_CTREE_ROW (node))->row.cell->type ); */
}
int main (int argc, char** argv)
{
GtkWidget* tree;
char* labels[] = {"label1", "label2"};
...
tree = gtk_ctree_new_with_titles (2, 0, labels);
gtk_signal_connect (GTK_OBJECT (ctree), "row-select",
GTK_SIGNAL_FUNC (select_row_cb), NULL);
gtk_ctree_insert_node (GTK_CTREE(tree), GTK_CTREE_NODE(NULL),
GTK_CTREE_NODE(NULL), labels, 5, NULL, NULL,
NULL, NULL, FALSE, TRUE);
...
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]