[Newbies] Re: Can I make a window outside of the

Herbert König herbertkoenig at gmx.net
Thu Apr 7 11:14:13 UTC 2011

Hi Rick,

RH> But maybe people expand their morphs to occupy the whole world, and insist
RH> that their morph stay on top, and call that it.  ?  

in the Morph's step method you can either set the World's extent to
the Morph's extent so when the user resizes the Squeak window, it
resizes to the Morph's size when the user lets go.

Or you resize the Morph's extent to the world's extent so it stays
full Window size. Or do a combination so the Window can't be made too
small for the morph.

To give an example for the first case from a very old image (but it
should still work):

        "keep the Squeak window sized"

        World extent = clientAreaSize "a point, set somewhere in init"
                                depth: DisplayScreen actualScreenDepth
                                width: clientAreaSize x
                                height: clientAreaSize y
                                fullscreen: false.
                        self extent: World extent; layoutChanged].
        self position = (0 at 0) ifFalse: [self position: 0 at 0]

Oh, and you need a stepTime method to return the number of
milliseconds between sends of step.



More information about the Beginners mailing list