[Cuis-dev] LayoutMorph subclass instance #beColumn has not effect
Alexandre Rousseau
yalexr at gmail.com
Mon Mar 13 14:30:19 PDT 2023
>
> You may want to try with #beRow if you want submorphs to align vertically
> (in rows).
Hmm... I'm not sure about this.
I've attached the filed-out test class to this email, if you want to take a
closer look.
Basically it is a LayoutMorph subclass, initialized as:
>
> initialize
> | b1 b2 b3 |
super initialize.
> self beRow.
> b1 BoxedMorph new :: color: Color red.
> b2 BoxedMorph new :: color: Color green.
> b3 BoxedMorph new :: color: Color blue.
> self addMorph: b1.
> self addMorph: b2.
> self addMorph: b3.
> self morphExtent: self minimumExtent.
and the instantiation of which results in this (attached image 1).
[image: image1.png]
[image: image 2.png]
Changing line 4 to "self beColumn" does not lay the items out vertically.
See attached image 2.
On Mon, Mar 13, 2023 at 4:01 PM marianomontone--- via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> On 13/3/23 13:36, Alexandre Rousseau via Cuis-dev <cuis-dev at lists.cuis.st>
> wrote:
> > Defining a class as subclass of LayoutMorph and initializing it thus:
> >
> > initialize
> > super initialize.
> > self beColumn.
> >
> >
> > morphs added to it still appear next to each other, horizontally, as if
> > #beColumn was ignored.
> >
> > Is this expected behaviour for a subclass of LayoutMorph?
>
> I think it is. You may want to try with #beRow if you want submorphs to
> align vertically (in rows).
>
> Mariano
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230313/bc52995e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image 2.png
Type: image/png
Size: 5004 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230313/bc52995e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image1.png
Type: image/png
Size: 4032 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230313/bc52995e/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestLayoutMorphSubclass.st
Type: application/octet-stream
Size: 772 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230313/bc52995e/attachment-0001.obj>
More information about the Cuis-dev
mailing list