Try using some different container like HBox or VBox it will automatically
arrange the dropped component x and y you just need to set the height and
width.

 

Thanks,

Kumar

  _____  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jmfillman
Sent: Wednesday, March 07, 2007 2:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Drag Drop Question

 

I'm using a Canvas as a Drag/Drop target for multiple items. 

I drop the first item, from a List, between (0,0) and (50,100). My 
logic moves the item to (0,0) and sets width=100 and height=50. Now, I 
drop another item between (0,0) and (50,100), with the same width and a 
height=300. However, there are now two items that are overlapping.

I need these items to be side-by-side, both with a width=50, instead of 
100 and overlapping. So the question is, how do I identify the overlap 
and adjust for it.

What if I drop a 3rd, 4th, or 5th item? I need the width to adjust 
accordingly so everything equally shares the available width.

 

Reply via email to