<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 4/30/2020 1:04 PM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote cite="mid:ea9711ab-d196-5eac-0e86-5eddbe61c3ca@drgeo.eu"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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 moz-do-not-send="true" class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a></pre>
</blockquote>
<br>
Glad to see you found a way to make it work.<br>
<br>
Still, if you'd rather have better clipping support, as I said in
another email, this is a good time to add that to Cuis.<br>
<br>
Thanks,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
</body>
</html>