Page 1 of 1
Can I Drag n Drop to Card or Stack?
Posted: Fri Feb 24, 2012 2:02 am
by BarrySumpter
Hi all,
I've been playing with drag n drop files n folder into Text Entry Fields.
I've finally got it all working.
Now I want to drag n drop files n folder onto the card or stack.
But I can't get either to work.
Am I supposed to be able to do this?
I know the LC dev editor allows me to drop a control onto the card.
But at runtime I'd like to dragEndter and dragDrop onto the card or the stack.
Re: Can I Drag n Drop to Card or Stack?
Posted: Fri Feb 24, 2012 2:13 am
by mwieder
Re: Can I Drag n Drop to Card or Stack?
Posted: Fri Feb 24, 2012 2:26 am
by BarrySumpter
Many thanks for the quick reply and the hyperlink.
I have read thru that article.
I believe the topic was dragging LC controls that are already existing around on the form.
The article was a bit vague regarding where all the code went.
Without a proper working example I'll have to deduce its psudo code.
Looks like I'll have to fake it I think.
Make the text entry field that does handles the dragEnter and dragdrop cover the entire card.
And change its background color to match the card background color etc.
If I have buttons and checkboxes and other controls,
can I pass the DragEnter dragdrop onto my text entry field that does handle the dragEnter dragDrop?
Will I have to write seperate code in each control to handle dragEnter dragdrop events?
Re: Can I Drag n Drop to Card or Stack?
Posted: Fri Feb 24, 2012 2:31 am
by BarrySumpter
I've copied my DragEnter and DragDrop code to the card.
I can drag filesnfolder ove the card with no effect.
now when I drag over a button the DragEnter and DragDrop script of the card fires.
Who knows? More trouble to uncover.
Re: Can I Drag n Drop to Card or Stack?
Posted: Fri Feb 24, 2012 2:45 am
by mwieder
Barry-
I wrote that article - that's actual working code pulled from a real application, not pseudocode.
Re: Can I Drag n Drop to Card or Stack?
Posted: Fri Feb 24, 2012 2:52 am
by BarrySumpter
Can you post the working app?
Do you know how to set the card to accept dragndrop?
wasn't there a post about faking the card background by covering the coard with a text field and setting it's opacity to 1
moving it zOrder to the back?
Re: Can I Drag n Drop to Card or Stack?
Posted: Fri Feb 24, 2012 3:13 am
by BarrySumpter
I've placed a text field contol onto the card and set its Opaque property to off.
And have set its Layer Property to 1.
And have removed all dragEnter and DragDrop script
except for the dragEnter and DragDrop code in the Card script.
OK all working to my liking at the moment.