<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Adjust the width of the scroller morph:</p>
<p>psp scroller morphWidth: 180.</p>
<p>Note that that width will not adjust dynamically (as you change
the morph extent of the whole morph).</p>
<p><br>
</p>
<div class="moz-cite-prefix">El 17/8/24 a las 16:11, Mark Volkmann
via Cuis-dev escribió:<br>
</div>
<blockquote type="cite"
cite="mid:CAFfRWnU6sMxuhoavo78tq+EY_pCjPWQrY=bysemYgHz_eTd9hA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">Added example code at bottom of this email ...</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Aug 16, 2024 at
1:16 PM Mark Volkmann <<a
href="mailto:r.mark.volkmann@gmail.com"
moz-do-not-send="true" class="moz-txt-link-freetext">r.mark.volkmann@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">I have the following Morph containment
hierarchy:
<div><br>
</div>
<div>- PluggableScrollPane</div>
<div> - LayoutMorph newColumn</div>
<div> - a bunch of LayoutMorph newRow</div>
<div><br>
</div>
<div>All of these have their layoutSpec proportionalWidth
set to 1.</div>
<div>When I run my app, the PluggableScrollPane width is
stretched to match the width of its parent.</div>
<div>But the other morph widths are not stretched to match
that width.</div>
<div>Is there something extra I need to send to
my PlugglableScrollPane to tell it that the width of the
assigned "scroller" (my LayoutMorph newColumn) should
have its width stretched?</div>
</div>
</blockquote>
<div><br>
</div>
<div>To demonstrate the issue, I created the class <font
face="monospace">ProportionalWidthIssue</font>. A
screenshot of the result and a fileOut are attached.</div>
<div>The question is why the width of <font face="monospace">column</font>
doesn't expand to fill the <font face="monospace">PluggableScrollPane</font>.</div>
<div><br>
</div>
<div>This class is a subclass of <font face="monospace">Object</font>
and only has the following instance methods.</div>
<div><br>
</div>
<div><font face="monospace">initialize<br>
| column psp |<br>
<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">column := LayoutMorph newColumn.<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">column layoutSpec proportionalWidth: 1.<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">column addMorph: (self makeRow: #('One'
'Two')).<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">column addMorph: (self makeRow: #('Three'
'Four')).<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">column addMorph: (self makeRow: #('Five'
'Six')).<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">column addMorph: (self makeRow: #('Seven'
'Eight')).<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">column addMorph: (self makeRow: #('Nine'
'Ten')).<br>
<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">psp := PluggableScrollPane new.<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">psp morphExtent: 200 @ 70.<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">psp scroller: column.<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">psp openInHand.<br>
</font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">makeRow: anArray<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">| row |<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">row := LayoutMorph newRow color: Color
white.<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">row layoutSpec proportionalWidth: 1.<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">anArray withIndexDo: [ :element :index |<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><span
style="font-family:monospace"> </span><span
class="gmail-Apple-converted-space"
style="font-family:monospace"> </span><span
style="font-family:monospace">| label |</span></div>
<div><span style="font-family:monospace"> </span><span
class="gmail-Apple-converted-space"
style="font-family:monospace"> </span><span
style="font-family:monospace"> </span><span
class="gmail-Apple-converted-space"
style="font-family:monospace"> </span><span
style="font-family:monospace">label := LabelMorph
contents: element.</span></div>
<div><span style="font-family:monospace"> </span><span
class="gmail-Apple-converted-space"
style="font-family:monospace"> </span><span
style="font-family:monospace"> </span><span
class="gmail-Apple-converted-space"
style="font-family:monospace"> </span><span
style="font-family:monospace">index = 1 ifTrue: [ label
layoutSpec proportionalWidth: 1 ].</span></div>
<div><span style="font-family:monospace"> </span><span
class="gmail-Apple-converted-space"
style="font-family:monospace"> </span><span
style="font-family:monospace"> </span><span
class="gmail-Apple-converted-space"
style="font-family:monospace"> </span><span
style="font-family:monospace">row addMorph: label.</span></div>
<div><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">].<br>
</font><span style="font-family:monospace"> <span
class="gmail-Apple-converted-space"> </span></span><font
face="monospace">^ row</font><br>
</div>
<div><br>
</div>
<div>A fileOut is attached. To see the issue, enter</div>
<div><font face="monospace">ProportionalWidthIssue new</font></div>
<div>in a Workspace and "Do It". </div>
</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="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>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
</body>
</html>