Page 1 of 1
Centering Card ontop of another card
Posted: Thu Mar 27, 2014 6:33 pm
by gpearson
I have a primary stack that is 562W x 732H and has 3 card within it. I have a substack of this primary stack that has a size of 400W x 400H. My question is when I click a button to show the substack, how can I center it on the primary stack?
The idea is to allow the user to click a button and have a new window open up to make changes to the application. Then on save it will close this "Window"
Re: Centering Card ontop of another card
Posted: Thu Mar 27, 2014 6:36 pm
by dunbarx
Hi.
Use the "loc" property:
set the loc of stack "stack 2" to the loc of stack "stack 1"
Craig Newman
EDIT.
It occurs to me that you also may want to ensure that the stack you are centering is the "topStack". Otherwise who knows what might happen?
That was meant to be homework.
Re: Centering Card ontop of another card
Posted: Thu Mar 27, 2014 7:34 pm
by magice
Just my 2 cents, but I have gotten away from using substacks in the way you described. I prefer to create a group consisting of an opaque graphic, (make it look like a dialog box if you prefer) and all the controls you would put on the substack. Then just change the "visible" of that group. That eliminates annoying problems like having openStack sent every time the substack is opened. There is nothing wrong about the way you have approached the problem, I just find the other way to be easier for me.