On Thu, May 20, 2010 at 1:46 PM, Fernando olivero <oliverof@lu.unisi.ch> wrote:morph := Morph new.
morph extent: 400@400.
centeredPosition := ( RealEstateAgent maximumUsableArea center - ( ( morph width /2) @ ( morph height /2) ) ) rounded .
morph position: centeredPosition.
morph openInWorld .
Thanks Fernando. I want to do that but for a Workspace. Workspace doesn't extend from Morph.
Cheers
Mariano
> <ATT00001..txt>
On May 20, 2010, at 1:31 PM, Mariano Martinez Peck wrote:
> How can I do that? For the moment, I am doing:
>
> openWelcomeWorkspace
>
> (Workspace new
> acceptContents: ' Welcome to pharo...blah blah
>
> ';
> embeddedInMorphicWindowLabeled: 'Welcome to Pharo')
> position: 50@120;
> extent: 800 @ 500;
> openAsIs
>
>
> I want to keep the extent, but the position to be centered.
>
> Thanks for any hint,
>
> Mariano
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
<ATT00001..txt>