How do I find out the maximum extent that a morph can be set to, without this impacting the current extent of its owner morph?

Alexandre Rousseau alexr at mailsnare.net
Thu Nov 29 11:01:23 UTC 2007


(I wasn't able to find a definitive answer on the newbies' list was  
able to help; trying again on this one)

I have a RectangleMorph instance (used as a stickie note's title bar)  
that contains 3 submorphs:

1. a SimpleButtonMorph, to trigger collapse/expansion of the stickie  
note (collapsed = stickie note's editor submorph hidden)

2. a StringMorph that contains a summary -- a contracted copy -- of  
the stickie note's editor's contents. I would like the length of that  
summary to depend on the width of the stickie note's title bar.

3. a StringMorph instance that is set to the last modification date  
of the stickie note.

So, question: how do I determine the maximum space that #2 can occupy  
before provoking a resize of the stickie note, and given that stickie  
note widths are left to user discretion, i.e., can and will vary.

Thanks
Alex




More information about the Squeak-dev mailing list