<!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 8/4/2024 6:16 PM, Mark Volkmann via Cuis-dev wrote:
<blockquote
cite="mid:CAFfRWnUbOBO9g5Tq6eyUVCoR10qeRn4osBR62F9T-sskBDrL0w@mail.gmail.com"
type="cite">
<div dir="ltr">I ran this code in a Workspace:
<div><br>
</div>
<div><font face="monospace">lm := LayoutMorph newColumn.<br>
lm separation: 10.<br>
lm layoutSpec offAxisEdgeWeight: 0.<br>
lm addMorph: (LabelMorph new contents: 'short'; color: Color
white).<br>
lm addMorph: (LabelMorph new contents: 'very long'; color:
Color white).<br>
lm openInWorld.</font></div>
<div><br>
</div>
<div>The attached screenshot shows what I get and includes the
LayoutSpec.</div>
<div>It looks like I successfully set the `offAxisEdgeWeight` to
zero, so I expected the two `LabelMorph` instances to be
left-aligned inside the `LayoutMorph`, but they are centered.</div>
<div>I must be misunderstanding how `offAxisEdgeWeight` works.<br
clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div><font face="arial, helvetica, sans-serif">R.
Mark Volkmann</font></div>
<div><span style="font-size: 12.8px;"><font
face="arial, helvetica, sans-serif">Object
Computing, Inc.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
What you want is:<br>
<br>
lm := LayoutMorph newColumn.<br>
lm separation: 10.<br>
b1 := LabelMorph new contents: 'short'; color: Color white.<br>
b1 layoutSpec offAxisEdgeWeight: 0.<br>
lm addMorph: b1.<br>
b2 := LabelMorph new contents: 'very long'; color: Color white.<br>
b2 layoutSpec offAxisEdgeWeight: 0.<br>
lm addMorph: b2.<br>
lm openInWorld.<br>
<br>
The off-axis wheight is a property of the submorph layoutSpec. Not
of the outer LayoutMorph. See `LayoutMorph example2`.<br>
<br>
BTW, play with, read the code, hack the code around. Do this with
all the LayoutMorph class side examples. They are there to help you.<br>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>