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



The Surprises wrote:
> On Tue, Oct 22, 2002 at 09:48:43PM -0400, Paul Davis wrote:
>>>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?
>>
>>yes, but you'll likely have no head left when you're done, because it
>>will rise up and bite it off. seriously, thats a deeply ugly
>>hack. don't do it.
> 
> How would I go about doing it then?  I could merge all my seperate
> canvas' into one, but then I'd have to handle all the
> packing/resizing/etc myself which I really didn't want to have to do.

I think this is usually faked with drag-under and drag-over effects.

You add code to the things you can drag to so they spot when something 
is over them and do some sort of animation, and you attach some sort of 
animated thing to the cursor, so it looks like something is being dragged.

When the user finally does the drop, you then do all the cutting, 
pasting and rebuilding.

John



========================================================== 

Madame de Pompadour 
Images of a Mistress 

16 October 2002 - 12 January 2003 

For information and tickets: 
http://www.nationalgallery.org.uk/exhibitions/pompadour/default.htm



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