Page 1 of 1

Positioning control behind another..

Posted: Wed Aug 12, 2015 2:55 pm
by tasdvl9
Hello All,

I've researched the web but haven't been able to find an easy way of doing this.

I have an invisible button covering my application window. I then added another button onto the window.
How do I position the second button behind the invisible button? I tried moving the invisible button position down
and then after placing the second button moving the invisible button back up to cover the button but to no avail.

I imagine there is a setting in the property inspector to do this but I can't seem to find the correct parameter to adjust.

Thanks!

Re: Positioning control behind another..

Posted: Wed Aug 12, 2015 2:58 pm
by dunbarx
Hi.

When you say "behind", do you mean in layer order or in the location on screen?

I assume "layer" order, based on your attempt to slide one behind the other. Read about this property in the dictionary.

Craig Newman

Re: Positioning control behind another..

Posted: Wed Aug 12, 2015 3:03 pm
by tasdvl9
Actually location on the screen.

What I ended up doing was deleting the invisible button and then adding it again.
This made sure the controls were all "behind" the invisible button.

Thanks.

Re: Positioning control behind another..

Posted: Wed Aug 12, 2015 3:41 pm
by dunbarx
Then you did indeed want to manage the "layer" property. What you did by deleting and adding a new control was to insure that the layer of that new control was higher than any of its cousins, and so it sat on top. Not a particularly robust a method, though it would work.

Experiment just a bit. Make two controls and overlap them. Change the "layer" of each. Watch what happens. This is the right way to do this sort of thing.

Craig

Re: Positioning control behind another..

Posted: Wed Aug 12, 2015 8:17 pm
by Simon
From the Project Browser you can just drag and drop the control to a different layer. It is showing the actual layer of the control like photoshop does.
But there is something funky about it... forget what is was :oops:

Simon

Re: Positioning control behind another..

Posted: Thu Aug 13, 2015 3:36 pm
by Klaus
Hi tasdvl9,

no need to mess around with inspector or Project brwoser, you can do this also via script!
Add this line before you make that invisible button visible again:
...
## Simply set the layer of that button to TOP and it will layered "above" all other controls
set the layer of btn "cover everything" to TOP
show btn "cover everything"
...
You get the picture :D


Best

Klaus

Re: Positioning control behind another..

Posted: Fri Aug 14, 2015 7:33 pm
by tasdvl9
Thanks for all the replies, Guys.

Much appreciated.