Re: Reparent tree iter



Hi,

On Sun, Aug 9, 2009 at 2:18 PM, Ian Liu<ian liu88 gmail com> wrote:
> I have a GtkTreeStore and I wanted to re-parent a leaf iterator.
> I asked on the #irc but I was told to fetch all data, append it on the
> correct parent and remove the first one. But I'm having some problems
> with the cursor-move event when doing this (obviously because the original
> selected iter is gone).
>
> I'm wondering if there is a way to re-parent an iter without destroying it.

As you have probably seen there are functions to reorder, swap or move
iterators in the same level.  There is no such functionality for moves
to different levels (re-parenting).  What you have been advised on the
IRC channel seems the easiest way for now.  (This is also how tree
view implements the drag and drop of a row to a difference place in
the tree).

What is the problem you are having with the "cursor-move" event?  Did
you mean the move-cursor event?


regards,

-kris.


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