[Cuis-dev] Question about LayoutMorph and overlapping fullBoundsInOwner
Mark Volkmann
r.mark.volkmann at gmail.com
Thu Apr 3 09:28:55 PDT 2025
I'm thinking that "one ends where the next one starts" does not mean they
overlap.
I guess you could say they share a border.
I did the following to make it more clear:
box1 := BorderedBoxMorph new morphExtent: 100 at 100; borderColor: Color
yellow; borderWidth: 2.
box2 := BorderedBoxMorph new morphExtent: 100 at 100; borderColor: Color red;
borderWidth: 2.
layout := LayoutMorph newColumn addMorph: box1; addMorph: box2.
layout openInWorld.
Note how the bottom border of the top box and top border of the bottom box
are both visible.
On Thu, Apr 3, 2025 at 8:14 AM Nicolás Papagna Maldonado via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> Hi Folks!
>
> In the following example I create a layout and add two 100x100 morphs.
>
> When I check their bounds in the owner, they seem to "overlap": notice the
> y=100 coordinate is shared by both morphs (one ends where the next one
> starts), even though they are not rendered overlapped.
>
> layout := LayoutMorph newColumn
> addMorph: (BoxMorph new morphExtent: 100 at 100);
> addMorph: (BoxMorph new morphExtent: 100 at 100).
>
> layout layoutSubmorphs.
>
> layout submorphs second fullBoundsInOwner. 0 at 0 corner: 100 at 100
> layout submorphs first fullBoundsInOwner. 0 at 100 corner: 100 at 200
>
> I found this while trying to find which morph was at the 0 at 100 local
> position inside the layout.
>
> Does this mean that fullBoundsInOwnerdoes not include the end?
>
> Cheers,
> Nico PM
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
--
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250403/df0be168/attachment-0001.htm>
More information about the Cuis-dev
mailing list