[Cuis-dev] Question about PlacedMorph

ken.dickey at whidbey.com ken.dickey at whidbey.com
Thu Mar 23 07:07:41 PDT 2023


On 2023-03-23 06:54, Alexandre Rousseau via Cuis-dev wrote:

> PlacedMorph subclass MyClass is initialized such that it contains 
> several submorphs.
> 
> What is the simplest way, from inside initialize, to ensure that my 
> instance's extent is such that all of its submorphs are visible? (or 
> must I specify this manually via morphExtent:?)

Using a LayoutMorph will do this for you.  A LayoutMorph resizes to 
contain its submorphs.

You may not want the LayoutMorph placement, however.

To resize the PlacedMorph yourself, see details in 
LayoutMorph>>minimumExtent

HTH,
-KneD


More information about the Cuis-dev mailing list