Getting a submorph to spaceFill

Ed Cavazos voltswagon at hotmail.com
Wed Mar 24 12:35:42 UTC 2004


Hello!

I've only been Squeaking for 2 days so I've got a very elementary question 
about Morphic layout stuff...

Below is a code snipet which illustrates the problem.

"**************************************************"
am := AlignmentMorph new.
am extent: 500 at 500.

picopaint := PicoPaintMorph new.
picopaint hResizing: #spaceFill.
picopaint vResizing: #spaceFill.

am addMorphBack: picopaint.
am openInWorld.
"**************************************************"

The PicoPaintMorph is from the "Introduction to Morphic" article by John 
Maloney.

So after invoking doit, the AlignmentMorph appears and the PicoPaintMorph is 
inside it. However, the size of the PicoPaintMorph is still it's initial 
size. That is, it hasn't filled up the remaining space in the 
AlignmentMorph. If I activate the halo's on the AlignmentMorph and manually 
resize it, the PicoPaintMorph finally get's resized. How do I get it to fill 
the space from the very beginning so that it looks correct as soon as I send 
'openInWorld' to the AlignmentMorph?

Thanks!

Ed

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.com/go/onm00200415ave/direct/01/




More information about the Squeak-dev mailing list