<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font size="+1">Ah Ah, I have a slightly different approach. <br>
</font></p>
<p><font size="+1">I created a ClipperMorph kind of LayoutMorph then
create one class side method.<br>
</font></p>
<p><tt><font size="+1">clip: aMorphToClip<br>
^ self newColumn<br>
addMorphUseAll: aMorphToClip;<br>
yourself</font></tt><br>
</p>
<div class="moz-cite-prefix">and the needed clipsLastMorph method,
that's all.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">As you mentioned, the added morphs are
clipped.</div>
<div class="moz-cite-prefix">Problem solved.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Hilaire<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 30/04/2020 à 13:36, Thierry Goubier
via Cuis-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CALS0RF1LDxLDCzW2zQjEC61muJ0QmA5oCa9aJ0o6FjOzhFYjBg@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">I had a similar issue, and what I did is to create an InsideMorph, as
a subclass of Morph.
a ViewportMorph is at the same level than scrollbars (in my case), and
has a single submorph: an InsideMorph. The InsideMorph can have many
submorphs.
The ViewportMorph clips the InsideMorph. Like that, the submorphs of
the InsideMorph are all clipped to the ViewportMorph bounds.
InsideMorph has only two methods: #drawOn: (that does nothing, but
turns off the Morph drawing code), and #morphExtent which returns its
owner extent (ViewportMorph).
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
GNU Dr. Geo
<a class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a></pre>
</body>
</html>