Re: [gtk-list] Moving tree items



Alistair Cunningham wrote:
> 
Hi,

> 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?
At the moment, it's not possible.

> 
> 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.
Normal, some parameters are initialized during widget creation.

> 
> Any ideas?
Yes... I need to modify the widget to authorize this.
I've some modifications to do. Another one.
I hope that will be fixe quickly.

-- 
-----------------------------------------------------------------------
    _/ _/_/  _/  _/_/   _/_/_/ _/_/_/ Bolliet Jerome
   _/ _/ _/ _/ _/  _/   /  _/     _/  email: bolliet@in2p3.fr
  _/ _/  _/_/    _/   _/_/_/   _/_/   
 _/ _/    _/   _/    _/         _/    Equipe Administration Systeme
_/ _/    _/  _/_/_/ _/     _/_/_/     email: sysunix@in2p3.fr
Centre de Calcul - Campus de la Doua
  27 boulevard du 11 novembre 1918    Tel.: 04 78 93 08 80
   69622 - VILLEURBANNE - FRANCE      Fax.: 04 78 94 30 54
-----------------------------------------------------------------------



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