Substack position

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bonbon
Posts: 62
Joined: Thu Jul 17, 2008 11:48 pm

Substack position

Post by bonbon » Tue Mar 16, 2010 7:05 pm

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)

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Substack position

Post by bn » Tue Mar 16, 2010 8:19 pm

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

bonbon
Posts: 62
Joined: Thu Jul 17, 2008 11:48 pm

Re: Substack position

Post by bonbon » Wed Mar 17, 2010 1:14 am

Thank you Bernd, that works fine. What a great forum !

Post Reply