<div dir="ltr">Hi Hilarie!<div><br></div><div>I subclassed PluggableMorph and build my way from there.</div><div>Implemented #layoutSubmorphs to calculate which ones should be displayed based on the scroll position and the item heights (similar to what LayourMoph does when it is created as a column).</div><div><br></div><div>I took a different approach wrt items though: unlike PluggableListMorph and friends where the list is in control of everything (which item is selected, highlighted, item click handler, etc), I wanted to see what happened when the "control is inverted" and all these responsibilities are moved to the item themselves.</div><div><br></div><div>That leaves the list with the responsibility of keeping the scroll positions, efficiently laying out submorphs, and a couple more things.</div><div><br></div><div>It worked great for my use case. Not all items should be instances of the same morph (items can have varying heights) and this gets you lots of flexibility to play with.</div><div><br></div><div>I will send the code over the weekend (just got back from a trip).</div><div><br></div><div>Best,</div><div>Nico PM</div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 13, 2022 at 5:11 PM Hilaire Fernandes via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</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">
  
    
  
  <div bgcolor="#FFFFFF">
    <p><font size="+1">Hi Nicola et al.</font></p>
    <p><font size="+1">After some thinking,  a InnerListOfMorph should
        simply be a subclass of MorphLayout (beColumn).</font></p>
    <p><font size="+1">The InnerListMorph draws directly its text
        content, highlight, selected. It could have been designed with a
        row of TextMorph but would have been inefficient.</font></p>
    <p><font size="+1">Nicolas, which direction did you took for your
        initial design?</font></p>
    <p>Hilaire<br>
    </p>
    <div>Le 11/01/2022 à 21:14, Hilaire
      Fernandes a écrit :<br>
    </div>
    <blockquote type="cite">
      
      <div lang="x-unicode">
        <p><font size="+1">Hi Nicola,</font></p>
        <p><font size="+1">Nice, I started subclassing those close for
            Morph, but not sure now it is the right way. Need to check
            again. In fact all could be simplified with only Morph as
            text in list can be morph too.</font></p>
        <p><font size="+1">Need some time to think about it..</font></p>
        <p><font size="+1">Best</font></p>
        <p><font size="+1">Hilaire</font><br>
        </p>
        <div>Le 08/01/2022 à 16:07, Nicolás
          Papagna Maldonado a écrit :<br>
        </div>
        <blockquote type="cite">Hi
          Hilarie!<br>
          <div><br>
          </div>
          <div>I had similar needs for a couple of projects (a generic,
            scrollable list of morphs -- PluggableListMorph but having
            any morph as an item).</div>
          <div>Initially, I took a look at PluggableListMophr,
            InnerListMorph, and friends but found them a bit hard to
            understand/change for what I needed (based on my very little
            experience with Morphic at the time).</div>
          <div><br>
          </div>
          <div>After some time I decided to "roll my own" because it
            looked like these classes were not created for that purpose,
            and also I really wanted to get into/learn how UI components
            work.</div>
          <div><br>
          </div>
          <div>I never finished the component but got it working fine
            for the PoC I was building at the time.</div>
          <div>The mail about Cuis-Smalltalk-UI got me thinking of
            getting it back in shape.</div>
          <div><br>
          </div>
          <div>Best,</div>
          <div>Nico PM</div>
        </blockquote>
        <pre cols="72">-- 
GNU Dr. Geo
<a href="http://drgeo.eu" target="_blank">http://drgeo.eu</a>
<a href="http://blog.drgeo.eu" target="_blank">http://blog.drgeo.eu</a></pre>
      </div>
    </blockquote>
    <pre cols="72">-- 
GNU Dr. Geo
<a href="http://drgeo.eu" target="_blank">http://drgeo.eu</a>
<a href="http://blog.drgeo.eu" target="_blank">http://blog.drgeo.eu</a></pre>
  </div>

-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><br>Nicolás Papagna</div>