Re: Moving canvas item's to new canvas not working



On Tue, Oct 22, 2002 at 08:39:29PM -0400, Paul Davis wrote:
> >I am trying to move gnome_canvas_item's from one canvas to another.  I
> >am using gnome_canvas_item_reparent, and giving it the item to move, and
> >the new canvas's root, like this:
> >
> >gnome_canvas_item_reparent (clip_box, gnome_canvas_root(GNOME_CAVAS(new_canvas
> >));
> >
> >I get the following error when I try this:
> >
> >GnomeUI-CRITICAL **: file gnome-canvas.c: line 1280 (gnome_canvas_item_reparen
> >t): assertion `item->canvas == GNOME_CANVAS_ITEM (new_group)->canvas' failed.
> >
> >It's not liking the reparenting for some reason but I'm not getting it.
> >Any ideas?
> 
> reparenting doesn't mean moving from one canvas to another, it means
> moving from one group to another. there is no way to do this without
> breaking the API open. 
> 
> --p

That's what I figured :(  Guess I'll have to do it the hard way.
Speaking of that, is there any way to redirect canvas item events to
another canvas item?  For example, if I am implemented a drag and drop
routine between canvas', while the user has the button pressed and is
moving a canvas item from one canvas to another, I would like to delete
the first item, create a new item in the new canvas, and have that new
item take over the button press/release event.  Is this possible?




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