Moving tree items




I have a tree item in a tree, and wish at run time to move this item to
another place in the same tree. Can this be done without destroying the
item?

gtk_tree_remove_items() destroys the item, so it's no good. The item
itself contains a subtree, so re-creating it again isn't really on.

I've tried various combinations of:

gtk_widget_hide(item);
item->parent = NULL;
gtk_tree_append(); in the appropriate place.

At best this corrupts the tree, at worst segfaults.

Any ideas?


Alistair Cunningham.

--------------------------------------------------------------------------
 Alistair Cunningham   Selwyn College, Cambridge   Email: ac212@cam.ac.uk



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