Re: GtkCTree vs GtkTree?
- From: Andrew King <kingos optushome com au>
- To: learfox furry ao net
- Cc: GTK Application Development List <gtk-app-devel-list gnome org>
- Subject: Re: GtkCTree vs GtkTree?
- Date: 31 Oct 2000 13:26:05 -1000
Could that be used for row select signal callbacks as well?
I read that there was a note about that not working out right?
Can I just create a ctree and set the select row callback as if it were a
clist and then get the row number and label that way? How would I get the
label for a row on the first (tree) column for a clist if it was a ctree?
Yes, you can pretty much do that. I do this stuff inside a popup menu
attached to a ctree button press event. (Note that tree is already defined
here, it is the ctree widget).
GList *list;
GtkCTreeNode *node,*new_node;
gchar *name,*string;
list = (GTK_CLIST(tree)) -> selection;
if (list != NULL) {
node = GTK_CTREE_NODE(list->data);
/* to get the label do */
gtk_ctree_get_node_info(GTK_CTREE(tree),child_node,&name,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
/* to attach a new node as the child of this node do */
string = g_strdup("New node");
new_node = gtk_ctree_insert_node(GTK_CTREE(tree),
node,NULL,&string,0,NULL,NULL,NULL,NULL,FALSE,TRUE);
g_free(string);
} /* this bracket should be further left but evolution is buggy :( */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]