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 [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
morph := Morph new.
morph extent: 400@400. centeredPosition := ( RealEstateAgent maximumUsableArea center - ( ( morph width /2) @ ( morph height /2) ) ) rounded . morph position: centeredPosition. morph openInWorld . 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 > <ATT00001..txt> _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On Thu, May 20, 2010 at 1:46 PM, Fernando olivero <[hidden email]> wrote: morph := Morph new. Thanks Fernando. I want to do that but for a Workspace. Workspace doesn't extend from Morph. Cheers Mariano
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
workspace := Workspace new. workspace acceptContents: ' Welcome to pharo...blah blah'. morph := workspace embeddedInMorphicWindowLabeled: 'Welcome to Pharo'. morph extent: 800@500. centeredPosition := ( RealEstateAgent maximumUsableArea center - ( ( morph width /2) @ ( morph height /2) ) ) rounded . morph position: centeredPosition. morph openAsIs . On May 20, 2010, at 2:21 PM, Mariano Martinez Peck wrote:
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |