[squeak-dev] Morphic question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Morphic question

Trygve
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: [hidden email]

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

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

Norway