Constraining a dropped object
Posted: Sun Sep 11, 2016 1:12 pm
Hi all, I'm new to LiveCode and was hoping you may be able to point me in the right direction.
I'm trying to make a simple desktop app where the user can drag items from a palate onto a window but the dragged item would need to be a child (contained within) an existing object in the window. For example, the user may drag an image or button on to a rectangle on a calendar (representing a day of the week) but the dropped object should be constrained within the rectangle.
I have been able to get the drag and drop portion working but am unsure how to get the dropped object to stay in the rectangle.
Another issue I'm having is that I will need to iterate through the child objects for any given date but I don't know how I would reference the relationship.
I have looked for examples but have not found anything that would establish a parent/child relationship between the objects.
Any help or example stacks I may have missed would be appreciated.
I'm trying to make a simple desktop app where the user can drag items from a palate onto a window but the dragged item would need to be a child (contained within) an existing object in the window. For example, the user may drag an image or button on to a rectangle on a calendar (representing a day of the week) but the dropped object should be constrained within the rectangle.
I have been able to get the drag and drop portion working but am unsure how to get the dropped object to stay in the rectangle.
Another issue I'm having is that I will need to iterate through the child objects for any given date but I don't know how I would reference the relationship.
I have looked for examples but have not found anything that would establish a parent/child relationship between the objects.
Any help or example stacks I may have missed would be appreciated.