<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Hilaire<br>
</p>
<div class="moz-cite-prefix">On 13/02/2025 8:51 am, Hilaire
Fernandes wrote:<br>
</div>
<blockquote type="cite"
cite="mid:9e40dcf3-85e8-4bf2-8fda-799412160db7@free.fr">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p><font size="4">It is likely not as feature complete as the
Squeak TableMoprh but it fills my need for now. </font></p>
</blockquote>
<p>I actually prefer it this way. A solution which is less complex
and easy to use. I think in Squeak a Squeak morph which uses a
TableLayout LayoutPolicy is a misnomer.</p>
<p>It only acts as a table if you have submorphs of fixed width and
pay attention how you add them in regards to the total width of
the morph. In fact does a flow layout.<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:9e40dcf3-85e8-4bf2-8fda-799412160db7@free.fr">
<p><font size="4">Can be observed in action toward the end of this
video <a class="moz-txt-link-freetext"
href="https://mamot.fr/@drgeo/113995472843136374"
moz-do-not-send="true">https://mamot.fr/@drgeo/113995472843136374</a><br>
</font></p>
</blockquote>
<p>Amazing demo what is now possible in terms of editing/annotating
in your Dynabook application.</p>
<p>I assume you use the FlowLayoutMorph in the flap you open at the
end.<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:9e40dcf3-85e8-4bf2-8fda-799412160db7@free.fr">
<p><font size="4"> </font></p>
<p><font size="4">May be FlowMorph will be a nice name, while
FlowLayoutMoprh might be a more precise name, I found it a bit
too long.</font></p>
</blockquote>
<p>There are many morph classes which have longer names.</p>
<p>If I search for a class and give as class name fragment 'Layout'
it will appear in the choices together with LayoutAdjustingMorph,
LayoutMorph and LayoutSpec.</p>
<p>So Layout related classes will be easily found. So I suggest to
go for the name 'FlowLayoutMorph'.</p>
<p>I did an example which mimics table layout behavior as all the
item morphs are of the same size</p>
<p>example1b<br>
"<br>
self example1b<br>
"<br>
| table cells |<br>
table := self new openInWorld.<br>
cells := OrderedCollection new.<br>
30 timesRepeat: [ |cellContent cellContentExtent cell |<br>
cellContentExtent := (15 to: 80) atRandom asPoint.<br>
cellContent := (ColoredBoxMorph new :: <br>
morphExtent: cellContentExtent; color: Color
random).<br>
<br>
cell := (LayoutMorph newRow :: morphExtent: 100@100;<br>
color: Color lightGray; layoutSpec: LayoutSpec
keepMorphExtent).<br>
cell addMorph: cellContent <br>
layoutSpec: (LayoutSpec fixedExtent:
cellContentExtent).<br>
cell axisEdgeWeight: #center.<br>
cells add: cell].</p>
<p> table cells: cells</p>
<p><br>
</p>
<p>But I guess this is not what you meant when you wrote earlier in
the thread</p>
<p>"<font size="4">Should be easy to add quite easily vertical
alignment preferences.</font>"<br>
</p>
<p>But my suggestion is to keep this current morph as a
FlowLayoutMorph as is and for a table with aligned columns go for
another Layout morph type and call that TableLayoutMorph.</p>
<p>A TableLayoutMorph which lets you define the column widths.<br>
</p>
<p>Hannes<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:9e40dcf3-85e8-4bf2-8fda-799412160db7@free.fr">
<p><font size="4">Hilaire<br>
</font></p>
<div class="moz-cite-prefix">Le 12/02/2025 à 21:06, H. Hirzel a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:78778bf4-b4b4-436f-942f-e35786e3b658@gmail.com">
<p>I think none of them. Above I wrote it is like the Squeak
TableMorph LayoutManager which I maintain.<br>
</p>
<p>I think it is rather like the Java FlowLayout</p>
<p><a class="moz-txt-link-freetext"
href="https://docs.oracle.com/javase/tutorial/uiswing/layout/flow.html"
moz-do-not-send="true">https://docs.oracle.com/javase/tutorial/uiswing/layout/flow.html</a></p>
<p>So maybe FlowLayoutMorph?</p>
<p>--Hannes</p>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://mamot.fr/@drgeo"
moz-do-not-send="true">http://mamot.fr/@drgeo</a></pre>
</blockquote>
</body>
</html>