Re: [gtk-list] Re: GtkCTreeNode
- From: Dave Cole <dave dccs com au>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: GtkCTreeNode
- Date: 22 Dec 1998 10:42:55 +1100
> This is what i've done :
> gtk_signal_connect(GTK_OBJECT(ctree), "tree_select_row",
> GTK_SIGNAL_FUNC(get_ctree_row), NULL);
> in gtk_ctree_row :void get_ctree_row(GtkCTree *ctree, GtkCTreeNode *row, gint
> column) {
> selected = row;
> }
>
> after :
> data = gtk_ctree_node_get_row_data(GTK_CTREE(ctree), selected);
> it return NULL
>
> idea ?
If you want to get the text from the node that is selected, use the following:
char *text;
gtk_ctree_node_get_text(ctree, node, column, &text);
The column parameter specifies which ctree column from which you wish
to retrieve the text.
When you use gtk_ctree_node_get_row_data(), it will only return data
that you previously attached using gtk_ctree_node_set_row_data().
- Dave
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS dpu s-:+ a C++$ ULS++$ P+++$>++++ L++>+++$ E+>++ W N++ !o K w++$ O !M-
!V(-) PS+ PE- Y+ PGP !t-- 5++ X R tv b+ DI+++ D G e++ h--- r+++ y++++
------END GEEK CODE BLOCK------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]