[Q] Morphic Layout

Karl Ramberg karl.ramberg at chello.se
Mon Dec 2 22:05:50 UTC 2002


Chris Burkert wrote:
> 
> Hi All
> 
> At first ... if this is the wrong place for asking those questions
> please tell me.
This is the place.
> 
> I have a RectangleMorph and a StringMorph. The String is Submorph of the
> Rectangle. I want that the String is in the top center of the Rectangle
> even when I resize the Rectangle. I played a little bit with TableLayout
> and ProportionalLayout, but didn't find what I need. Can you help me ?
> 
> minimum width: |theString|
> and bigger:    |                  theString                  |
> 
re _ RectangleMorph new.
re addMorph:(StringMorph new).
re layoutPolicy: TableLayout new.
re wrapCentering: #center.
re openInWorld

Karl



More information about the Squeak-dev mailing list