Designing proportional layout with the mouse

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

Designing proportional layout with the mouse

Alexandre Jasmin
I'm trying to design a Morphic layout using a minimum of code. I see
that you can set the layout policy of a morph from the Yellow button
menu. Unfortunately, I don't know how to add a sub morph using that
policy.

Currently I'm positioning one morph on top of another and evaluate this
code:

parent layoutPolicy: ProportionalLayout new.

parent
  addMorph: chld
    fullFrame: (
      LayoutFrame fractions: (
        (chld topLeft - parent topLeft / parent extent) corner:
         (chld bottomRight - parent topLeft / parent extent)
      )
    )


While that works I'd like to do this the eToy like way if possible.

Alex

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Designing proportional layout with the mouse

Alexandre Jasmin
>         (chld topLeft - parent topLeft / parent extent) corner:
>          (chld bottomRight - parent topLeft / parent extent)

The position is relative to the parent innerBounds

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners