[Newbies] Ho to get center of the system screen
peace_the_dreamer at yahoo.com
Sun Mar 14 19:34:45 UTC 2010
--- On Sun, 3/14/10, FrankBz <kyotosong at libero.it> wrote:
> From: FrankBz <kyotosong at libero.it>
> Subject: [Newbies] Ho to get center of the system screen
> To: beginners at lists.squeakfoundation.org
> Date: Sunday, March 14, 2010, 8:02 AM
> Hi, how can I get a point representing the screen center?
> I need it to open a morph at that position. So far I tried
> with - World
> center - but the position is on the bottom right of the
> Does anyone know how to get it?
> Thanks in advance
"Display center" is the center of the screen.
World and Display often have the same bountries.
myMorph postition: Display center .
Will put the morph top right at the center. Therefore the center of the morph will be more towards the bottom right.
myMorph center: Display center .
Will align the two centers which is usually what's wanted.
myMorph openCenteredInWorld .
Will usually put a newly created morph in the center. It can do other things depending on how myMorph deals with layout when sent the selector #openCenteredInWorld.
Yours in curiosity and service, --Jerome Peace
More information about the Beginners