Position Substack relative to mainstack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Position Substack relative to mainstack
I am having troubles positioning a smaller substack relative to the position of the main stack or an object in the main stack.
Any help would be appreciated.
Regards,
Paul
Any help would be appreciated.
Regards,
Paul
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Position Substack relative to mainstack
Got it
,
Mayby a bit elaborate but it works.
Any faster way's? Please let me know!

Mayby a bit elaborate but it works.
Any faster way's? Please let me know!

Code: Select all
put the topLeft of me into tsavedTopLeft // it the button that launches the substack. Can be any other object on the card.
put item 1 of tsavedTopLeft into tLeftMeCoordinate
put item 2 of tsavedTopLeft into tTopMeCoordinate
put the TopLeft of this stack into tStackLocation
put item 1 of tStackLocation into tLeftCoordinate
put item 2 of tStackLocation into tTopCoordinate
put -180 into tMoveLeftRight// This positions the SubStack hor-coordinate relative to the object (button that launches the substack in this case)
put -100 into tMoveUpDown // This positions the SubStack vert-coordinate relative to the object (button that launches the substack in this case)
add tTopMeCoordinate+tMoveUpDown to tTopCoordinate
add tLeftMeCoordinate+tMoveLeftRight to tLeftCoordinate
put tLeftCoordinate&","&tTopCoordinate into tSubStackLocation
open invisible stack "theSubStackName"
set the topLeft of stack "theSubStackName" to tSubStackLocation
set the visible of stack "theSubStackName" to true
Re: Position Substack relative to mainstack
Dag Paul.
not sure I understand your problem correctly, but I would:
Best
Klaus
not sure I understand your problem correctly, but I would:
Code: Select all
...
## Use SCREEN coordinates directly!
put globalloc(the topLeft of me) into tsavedTopLeft
## Add H and V offset
add 180 to item 1 of tsavedTopLeft
add 100 to item 2 of tsavedTopLeft
## Set loc of substack, no need to open it invisible before!
set the topLeft of stack "theSubStackName" to tsavedTopLeft
go stack "theSubStackName"
...
Klaus
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Position Substack relative to mainstack
LOL ...
Knew it could be done much easier..
Bedankt !

Bedankt !
Re: Position Substack relative to mainstack
Graag gedaan! 

Re: Position Substack relative to mainstack
Gesundheit.
I often locate a substack to the right of a mainstack by:
Craig
I often locate a substack to the right of a mainstack by:
Code: Select all
...
set the left of stack "subStack" to the right of stack "mainStack + 10
set the top of stack "subStack" to the top of stack "mainStack"
Re: Position Substack relative to mainstack
dunbarx wrote:Gesundheit.



-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Position Substack relative to mainstack
Thanks Craig.... 
