Hi Team,
I'm using 3 Stacks, a Primary Stack which launches a Secondary Stack, that on occasion launches a 3rd, Extra stack. Problem being when the Secondary stack, launches the Extra stack. The Extra is put behind the Secondary, and I can't see it. Is there a way of controlling which stacks appear in front of others?
Thanks for any insight.
James
Order of Multiple Stacks
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Order of Multiple Stacks
Many, but it depends on what you want to happen ultimately.
If you want the 3rd stack to always be over the 2nd in display, 'palette stack 3' would probably be the way to go.
If you want the 3rd stack to always be over every other window regardless of where that window came from, make it a system window.
If you just want to have it initially over the window, just opening it and [go to stack "name"] should suffice.
I'd shy away from toplevel (unless you really want to make it the topLevel stack).
Lastly, you could always just set the topLeft of the extra stack to the topRight (or the reverse) of the 2nd stack, which would make it open to either side of the 2nd.
If you want the 3rd stack to always be over the 2nd in display, 'palette stack 3' would probably be the way to go.
If you want the 3rd stack to always be over every other window regardless of where that window came from, make it a system window.
If you just want to have it initially over the window, just opening it and [go to stack "name"] should suffice.
I'd shy away from toplevel (unless you really want to make it the topLevel stack).
Lastly, you could always just set the topLeft of the extra stack to the topRight (or the reverse) of the 2nd stack, which would make it open to either side of the 2nd.
-
- VIP Livecode Opensource Backer
- Posts: 9655
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Order of Multiple Stacks
Hi,
I would not change the style of your stacks, but rather just manage the topLevel property. If you, as Bogs mentioned, set the topLevel, which does it no harm and gives it no "permanent" status, that stack will appear above all the others.
You may not be able to see a particular stack if it is buried, so clicking on it may not be a reliable option. You can write a short handler that can order your stacks. This is likely overkill, and seems silly, but may be instructive in its own right.
Make 3 stacks, and name them "x1", "x2" and "x3". In the script of, say, "x1":
Now in the message box:
This allows any of the stacks (actually any other stack as well) to access this handler. Now hold the optionKey down and click on any stack. Select the order, and voila.
I told you it was silly.
Craig
I would not change the style of your stacks, but rather just manage the topLevel property. If you, as Bogs mentioned, set the topLevel, which does it no harm and gives it no "permanent" status, that stack will appear above all the others.
You may not be able to see a particular stack if it is buried, so clicking on it may not be a reliable option. You can write a short handler that can order your stacks. This is likely overkill, and seems silly, but may be instructive in its own right.
Make 3 stacks, and name them "x1", "x2" and "x3". In the script of, say, "x1":
Code: Select all
on mouseUp
if the optionKey is down then
answer "Set Layers?" with "123" or "132" or "231" or "213" or "312" or "321"
repeat with y = 3 down to 1
topLevel stack ("x" & char y of it)
end repeat
end if
end mouseUp
Code: Select all
insert the script of stack "x1" into back
I told you it was silly.
Craig