[squeak-dev] Morphic question

Trygve Reenskaug trygver at ifi.uio.no
Tue Jul 7 19:02:02 UTC 2009


Hi,
I work with a simple morph struture:
    aPasteupMorph >> selectorMorph(aMorph) >> rMorph(anEllipseMorph) >> 
nameMorph(aTextMorph)

I create the TextMorph enclosed within the EllipseMorph:
    selectorMorph := Morph new
      in a loop:
         [ rMorph := EllipseMorph new
                layoutPolicy: TableLayout new;
                hResizing: #shrinkWrap;
                vResizing: #shrinkWrap;
                position: <some value>;
                yourself.
            nameMorph := TextMorph new
                contents: <some text>;
                yourself.
            rMorph addMorphBack: nameMorph.
            selectorMorph addMorphFront: rMorph.
         ]
I place the rMorphs at given positions. I want the selectorMorph to wrap 
the rMorphs, but have only found a very clumsy way of doing it.

One problem is that I can't get the rMorph to wrap the NameMorph without 
actually displaying it.
Another is that I cannot make the selectorMorph wrap the rMorphs without 
moving them.

I feel sure there must be a simple solution.
I'll be grateful for any ideas
--Trygve


-- 

Trygve Reenskaug       mailto: trygver at ifi.uio.no

Morgedalsvn. 5A         http://heim.ifi.uio.no/~trygver

N-0378 Oslo               Tel: (+47) 22 49 57 27

Norway

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090707/fdea66a8/attachment.htm


More information about the Squeak-dev mailing list