Hello, I am new using LiveCode and I have a question:
I am creating an app and I can see than on inspector you can setup the position at which the stack will appears on a screen (standalone mac app) when is running. Since there many screens setup to diffeent resolution I am trying to setup one standard position on the screen for all the apps I am building.
Is there any more efficient way to do this rather that input the position to every stack or subtack or card you create?
Thanking you for your help.
Herman
EXACT POSITION ON A SCREEN
Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller
Re: EXACT POSITION ON A SCREEN
normally, you'd want the center of the screen. Which is available as "the screenLoc".
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: EXACT POSITION ON A SCREEN
Please forgive me since I am new...where I can find this the screenLoc settings?BvG wrote:normally, you'd want the center of the screen. Which is available as "the screenLoc".
Herman
Re: EXACT POSITION ON A SCREEN
Hi herman,
this is no "setting"! Simply use it
Please check the LiveCode dictionary for info!
Example to "center" a stack on the screen:
Best
Klaus
this is no "setting"! Simply use it
Please check the LiveCode dictionary for info!
Example to "center" a stack on the screen:
Code: Select all
on preopenstack
set the loc of this stack to the screenloc
end preopenstackBest
Klaus
Re: EXACT POSITION ON A SCREEN
Thank you, I guess I will have to read the dictionary!Klaus wrote:Hi herman,
this is no "setting"! Simply use it
Please check the LiveCode dictionary for info!
Example to "center" a stack on the screen:Code: Select all
on preopenstack set the loc of this stack to the screenloc end preopenstack
Best
Klaus
Cheers
Herman
Re: EXACT POSITION ON A SCREEN
It worked!Klaus wrote:Hi herman,
this is no "setting"! Simply use it
Please check the LiveCode dictionary for info!
Example to "center" a stack on the screen:Code: Select all
on preopenstack set the loc of this stack to the screenloc end preopenstack
Best
Klaus
I was thinking that when dictionary explain the syntaxis as ScreenLoc() I have to actually enter some numbers for the x and y position of the monitor.
But instead when the function is applied, automatically measures the resolution of screen and place the app in the centre. Very interesting!
Again, thank you
Herman
