<div dir="ltr">That makes sense. Thanks.<div><br></div><div>...</div><div><br></div><div>Subclassing PlacedMorph was a mistake in my case. I was better off, again, subclassing LayoutMorph, ending up with this hierarchy:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">LayoutMorph (self)<br>- BoxMorph (lightBox)<br>-- LayoutMorph (lightBoxLayout)<br>--- BoxMorph (redLight)<br>--- BoxMorph (yellowLight)<br>--- BoxMorph (greenLight)</blockquote><div><br class="gmail-Apple-interchange-newline"></div><div>Then, calling "<font face="monospace">lightBox morphExtent: lightBoxLayout minimumExtent</font>" was sufficient to pack everything to perfection.</div><div><br></div><div><img src="cid:ii_lfl908150" alt="Screenshot 2023-03-23 at 11.08.12 AM.png" width="86" height="206" style="margin-right: 0px;"><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 23, 2023 at 10:07 AM <<a href="mailto:ken.dickey@whidbey.com">ken.dickey@whidbey.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2023-03-23 06:54, Alexandre Rousseau via Cuis-dev wrote:<br>
<br>
> PlacedMorph subclass MyClass is initialized such that it contains <br>
> several submorphs.<br>
> <br>
> What is the simplest way, from inside initialize, to ensure that my <br>
> instance's extent is such that all of its submorphs are visible? (or <br>
> must I specify this manually via morphExtent:?)<br>
<br>
Using a LayoutMorph will do this for you.  A LayoutMorph resizes to <br>
contain its submorphs.<br>
<br>
You may not want the LayoutMorph placement, however.<br>
<br>
To resize the PlacedMorph yourself, see details in <br>
LayoutMorph>>minimumExtent<br>
<br>
HTH,<br>
-KneD<br>
</blockquote></div>