How to resize a submorph according to it’s owner?

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

How to resize a submorph according to it’s owner?

Helene Bilbo
Hi,
when i embed a Morph A into a Morph B and then resize B, A stays the same size.
I would like A to resize proportional accroding to the resizing of B.

In the Halo-Menu there is a LayoutPolicy that can be set to ProportionalLayout - but that seems not to change anything.

Can anyone give me a hint?

Best regards,
Helene.
Reply | Threaded
Open this post in threaded view
|

Re: How to resize a submorph according to it’s owner?

Sean P. DeNigris
Administrator
Helene Bilbo wrote
when i embed a Morph A into a Morph B and then resize B, A stays the same size.
I would like A to resize proportional accroding to the resizing of B.
Good work so far - ProportionalLayout is exactly what you want. See the great examples at http://wiki.squeak.org/squeak/2141
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: How to resize a submorph according to it’s owner?

Helene Bilbo
Sean P. DeNigris wrote
Helene Bilbo wrote
when i embed a Morph A into a Morph B and then resize B, A stays the same size.
I would like A to resize proportional accroding to the resizing of B.

In the Halo-Menu there is a LayoutPolicy that can be set to ProportionalLayout - but that seems not to change anything.
Good work so far - ProportionalLayout is exactly what you want. See the great examples at http://wiki.squeak.org/squeak/2141
Thank you. It works fine if i write code.

Now i would also like to get the same result by directly manipulating morphs (via halos):
 - open a bigger and a smaller Morph in a world.
 - via the halo menu set the layout policy of the bigger Morph to ProportionalLayout.
 - drag the smaller Morph above the bigger one.
 - embed the smaller one into the bigger one.
 -> if i resize the bigger Morph the smaller one stays the same size :(
Reply | Threaded
Open this post in threaded view
|

Re: How to resize a submorph according to it’s owner?

Helene Bilbo
"Helene Bilbo“ wrote
Helene Bilbo wrote
when i embed a Morph A into a Morph B and then resize B, A stays the same size.
I would like A to resize proportional accroding to the resizing of B.
Thank you. It works fine if i write code.

Now i would also like to get the same result by directly manipulating morphs (via halos):
 - open a bigger and a smaller Morph in a world.
 - via the halo menu set the layout policy of the bigger Morph to ProportionalLayout.
 - drag the smaller Morph above the bigger one.
 - embed the smaller one into the bigger one.
 -> if i resize the bigger Morph the smaller one stays the same size :(
The reason seems to be, that, when i try to combine Morphs via the halo-menu and choose ProportionalLayout there is no LayoutFrame generated.

- Is there a case, where ProportionalLayout makes sense without a LayoutFrame?
- Is there a way to generate a LayoutFrame when manipulating Morphs directly using the mouse and halo-menus?

Best regards,
Helene.