<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi, <br>
    </p>
    <p>In a row (or a column), when I want one morph to be at the left
      and the other one at the right (here a LabelMorph and a
      WheelMorph) :</p>
    <img moz-do-not-send="false"
      src="cid:part1.WeZ9Hmbp.2RsWp0iR@free.fr" alt="row" width="810"
      height="52">
    <p>I use a kind of elastic morph to fill the content between the two
      morphs with a transparent Morph (line 5):</p>
    <p><!-- HTML generated using hilite.me --></p>
    <p><!-- HTML generated using hilite.me --></p>
    <div style="background: #ffffff;
      overflow:auto;width:auto;border:solid gray;border-width:.1em .1em
      .1em .8em;padding:.2em .6em;">
      <table>
        <tbody>
          <tr>
            <td>
              <pre style="margin: 0; line-height: 125%">1
2
3
4
5
6
7</pre>
            </td>
            <td>
              <pre style="margin: 0; line-height: 125%">        <span style="color: #888888">"Install the wheels at the right"</span>
        <span style="color: #996633">col</span> <span style="color: #333333">:=</span> <span style="color: #BB0066; font-weight: bold">LayoutMorph</span> <span style="color: #0066BB; font-weight: bold">newColumn</span> <span style="color: #0066BB; font-weight: bold">name:</span> <span style="color: #AA6600">#wheelsYZ</span>.
        <span style="color: #996633">col</span> <span style="color: #0066BB; font-weight: bold">addMorph:</span> <span style="color: #007020">self</span> <span style="color: #0066BB; font-weight: bold">zoomWheel</span> <span style="color: #0066BB; font-weight: bold">layoutSpec:</span> (
                <span style="color: #BB0066; font-weight: bold">LayoutSpec</span> <span style="color: #0066BB; font-weight: bold">fixedExtent:</span> <span style="color: #BB0066; font-weight: bold">DrGeoSystem</span> <span style="color: #0066BB; font-weight: bold">wheelWidth</span> <span style="color: #0066BB; font-weight: bold">@</span> <span style="color: #BB0066; font-weight: bold">DrGeoSystem</span> <span style="color: #0066BB; font-weight: bold">wheelHeight</span>).
        <span style="color: #996633">col</span> <span style="color: #0066BB; font-weight: bold">addMorphUseAll:</span> <span style="color: #007020">self</span> <span style="color: #0066BB; font-weight: bold">transparentMorph</span>.
        <span style="color: #996633">col</span> <span style="color: #0066BB; font-weight: bold">addMorph:</span> <span style="color: #007020">self</span> <span style="color: #0066BB; font-weight: bold">verticalWheel</span> <span style="color: #0066BB; font-weight: bold">layoutSpec:</span> (
                <span style="color: #BB0066; font-weight: bold">LayoutSpec</span> <span style="color: #0066BB; font-weight: bold">fixedExtent:</span> <span style="color: #BB0066; font-weight: bold">DrGeoSystem</span> <span style="color: #0066BB; font-weight: bold">wheelWidth</span> <span style="color: #0066BB; font-weight: bold">@</span> <span style="color: #BB0066; font-weight: bold">DrGeoSystem</span> <span style="color: #0066BB; font-weight: bold">wheelHeight</span>).                   
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <p><!-- HTML generated using hilite.me --></p>
    <p>Is there a better way of doing this? I think about embedding the
      second morph (the wheel) in an additional column with alignment
      set to right, but this adds complexity to the code and make it
      harder to understand.</p>
    <!-- HTML generated using hilite.me -->
    <div style="background: #ffffff;
      overflow:auto;width:auto;border:solid gray;border-width:.1em .1em
      .1em .8em;padding:.2em .6em;">
      <pre style="margin: 0; line-height: 125%"><span style="color: #0066BB; font-weight: bold">transparentMorph</span>
<span style="color: #333333">^</span> <span style="color: #BB0066; font-weight: bold">BoxedMorph</span> <span style="color: #007020">new</span> 
   <span style="color: #0066BB; font-weight: bold">borderWidth:</span> <span style="color: #6600EE; font-weight: bold">0</span>;
   <span style="color: #0066BB; font-weight: bold">color:</span> <span style="color: #BB0066; font-weight: bold">Color</span> <span style="color: #0066BB; font-weight: bold">transparent</span>; 
   <span style="color: #0066BB; font-weight: bold">yourself</span>
</pre>
    </div>
    <p><!-- HTML generated using hilite.me --></p>
    <p>If there is not better way we could add an helper method to
      LayoutMorph, say addElastic, that will do just that:</p>
    <div style="background: #ffffff;
      overflow:auto;width:auto;border:solid gray;border-width:.1em .1em
      .1em .8em;padding:.2em .6em;">
      <pre style="margin: 0; line-height: 125%"><span style="color: #0066BB; font-weight: bold">LayoutMorph>>addElastic</span>
   <span style="color: #007020">self</span> <span style="color: #0066BB; font-weight: bold">addMorphUseAll:</span> (<span style="color: #BB0066; font-weight: bold">BoxedMorph</span> <span style="color: #007020">new</span>
        <span style="color: #0066BB; font-weight: bold">borderWidth:</span> <span style="color: #6600EE; font-weight: bold">0</span>;
        <span style="color: #0066BB; font-weight: bold">color:</span> <span style="color: #BB0066; font-weight: bold">Color</span> <span style="color: #0066BB; font-weight: bold">transparent</span>; 
        <span style="color: #0066BB; font-weight: bold">yourself</span>)
</pre>
    </div>
    <p><!-- HTML generated using hilite.me --></p>
    <p>Thanks</p>
    <p>Hilaire</p>
    <p><!-- HTML generated using hilite.me --></p>
    <p><!-- HTML generated using hilite.me --></p>
    <p><!-- HTML generated using hilite.me --></p>
    <pre class="moz-signature" cols="72">-- 
GNU Dr. Geo
<a class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a>
<a class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
  </body>
</html>