How to script "Bring to Front"

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
david_fff
Posts: 29
Joined: Wed Nov 12, 2014 5:29 pm

How to script "Bring to Front"

Post by david_fff » Sat Jun 27, 2015 7:52 pm

If I select an object I can bring it to the front of the layers using the submenu of the 'Object' menu: "Bring to Front". How do I write that function into a script? I searched 'Front" and "Bring" and "send" but no luck.
Thanks,
David

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: How to script "Bring to Front"

Post by Dixie » Sat Jun 27, 2015 8:16 pm

Code: Select all

set the layer of button "xyz" to top

david_fff
Posts: 29
Joined: Wed Nov 12, 2014 5:29 pm

Re: How to script "Bring to Front"

Post by david_fff » Sat Jun 27, 2015 9:37 pm

Ah. So easy. Thanks, Dixie!

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: How to script "Bring to Front"

Post by SparkOut » Sat Jun 27, 2015 9:55 pm

And for good measure, you can script to set the layer to bottom, or to a number.

Post Reply

Return to “Talking LiveCode”