Hello,
When in run mode, it's very easy to drag an object using "grab me".
However when to object is dragged over another object, sometimes it goes on top, and sometimes it goes under.
Is there a way to move an object on top of everything (topmost) when dragged ?
Thanks in advance
Félix
Moving an object to the foreground when it is dragged
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Moving an object to the foreground when it is dragged
Hi Felix
If the owner of your object is a group you have to know what is the layer of last object of the group and that should be the max top layer you can use
Best regards
Jean-Marc
Yes, you can set the layer of a object.Is there a way to move an object on top of everything (topmost) when dragged ?
If the owner of your object is a group you have to know what is the layer of last object of the group and that should be the max top layer you can use
Best regards
Jean-Marc
https://alternatic.ch
-
- Livecode Opensource Backer
- Posts: 9356
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Moving an object to the foreground when it is dragged
Splendid ! Many thanks.
I thought HyperCard was simple.
LC is even more simpler.
on mouseDown
set the layer of me to top
grab me
end mouseDown
I thought HyperCard was simple.
LC is even more simpler.
on mouseDown
set the layer of me to top
grab me
end mouseDown
-
- Livecode Opensource Backer
- Posts: 9356
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Moving an object to the foreground when it is dragged
Part of the reason for that is that HyperCard only has 2 layers: foreground and background, while
LiveCode has as many as the number of objects on a card (each object is in its own layer).
Not very helpful at all.
LiveCode has as many as the number of objects on a card (each object is in its own layer).
Not very helpful at all.