[Cuis-dev] LayoutMorph example7 - how to constrain the size of SystemWindow object

Juan Vuletich juan at cuis.st
Tue Oct 7 03:01:46 PDT 2025


Unless someone corrects me, I believe you need to code that yourself.

Cheers,

On 06/10/2025 7:12 PM, H. Hirzel via Cuis-dev wrote:
> P.S. What I mean is, how do I constrain the size of the SystemWindow 
> object without hard coding the extent as in the answer to Hilaire's mail.
>
> On Tue, Oct 7, 2025 at 12:09 AM H. Hirzel <hannes.hirzel at gmail.com> wrote:
>
>     Hi
>
>     In the LayoutMorph example7 the size of the SystemWindow object is
>     too large.
>
>     How do I constrain the size of it so that it has the size as
>     required by the morphs it contains?
>
>     This is in recent Cuis 7.5-7635
>
>     Kind regards
>     Hannes
>
>     -----------------------------------------------------------------------
>     The updated example: It now shows the color given by the hex code
>     but the window size is too large
>
>     | c colorHexValue colorName r w colorHexValueLabel |
>     w := SystemWindow new setLabel: 'Color'.
>     r := LinearLayoutMorph newRow separation: 30 @ 10.
>     c := LinearLayoutMorph newColumn separation: 20 @ 10.
>     colorHexValue := '#FF00FF'.
>     colorHexValueLabel := LabelMorph contents: colorHexValue .
>     colorName := LabelMorph contents: 'magenta'.
>
>     r addMorph: colorHexValueLabel.
>     r addMorph: colorName.
>     c addMorph: (ColoredBoxMorph new color: (Color fromHexString:
>     colorHexValue)).
>     c addMorph: r.
>     w addMorph: c .
>     w openInWorld.
>
>
>
-- 
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251007/1ddd2596/attachment.htm>


More information about the Cuis-dev mailing list