Page 1 of 1

Substack position

Posted: Tue Mar 16, 2010 7:05 pm
by bonbon
My main stack has just one button, and a substack. The code on the main stack's button is:

Code: Select all

on mouseUp
   set the topLeft of stack "Substack name" to 10, 33
   open stack "Substack name"
end mouseUp
When I run the app within the Rev development environment, the substack opens, nicely positioned at the top left corner. When I close the substack, and press the button again, it appears precisely 102 pixels lower down.

Close the substack, and press the button again, and the substack is back to it's correct position. It alternates; every other button press, it appears 102 pixels down.

I must be doing something daft ... any ideas please ? (Rev 3.5 Studio on Windows XP)

Re: Substack position

Posted: Tue Mar 16, 2010 8:19 pm
by bn
bonbon,
try

Code: Select all

   open invisible stack "Substack name" 
   set the topLeft of stack "Substack name" to 10,33
   set the visible of stack "Substack name" to true
why it switches positions in your version of the script, I don't know.

regards
Bernd

Re: Substack position

Posted: Wed Mar 17, 2010 1:14 am
by bonbon
Thank you Bernd, that works fine. What a great forum !