[Help]Collapsing morphs in system window with button

Ned Konz ned at bike-nomad.com
Sun Jan 26 17:36:50 UTC 2003

On Sunday 26 January 2003 05:09 am, Keith McKay wrote:
> I hope someone can give me some hints to solve this problem.
> I have a SystemWindowWithButton Morph in a project and I have
> embedded a number of TextMorphs, ButtonMorphs and RectangleMorphs
> into this SystemWindow.  I have been using the scripting system to
> add methods to these various Morphs, and needing some space on the
> desktop I hit the collapse button on the SystemWindow. It
> collapsed, but the embedded morphs were still visible on the desk
> top.
> I have inspected the button, and its target is a
> SystemWindowWithButton (as expected) and the actionSelector
> #collapseOrExpand.  I can understand the condition part of the
> #collapseOrExpand but the rest of the method is quite complicated. 
> Also what I find even more confusing is that when the button on a
> Browser is clicked, all the subMorphs which make it up, collapse. 
> I'm obviously missing something here and would appreciate hints on
> how to get round this problem.

I think the problem is that the SystemWindow only collapses its 
paneMorphs. And your submorphs probably aren't paneMorphs.

If you add Morphs to the window using the "standard" addMorph:frame: 
or addMorph:fullFrame: then they will (as I recall) get added to 
paneMorphs. Plus they'll get resized properly when the window is 

Unfortunately, just manually embedding Morphs into windows doesn't 
work very well when the window is sized or collapsed (as you've 

> Oh, I also seem to have a red rectangle with yellow diagonals on my
> project desktop, that I can't get the halos up on so that I can
> send it to trash.  Any hints for this as well?

This is because the Morph had an error when drawing itself. Try using 
a drag-select on the desktop and then deleting the resultant 

Ned Konz

More information about the Squeak-dev mailing list