[Cuis-dev] adding a morph to start of LayoutMorph

Mark Volkmann r.mark.volkmann at gmail.com
Fri Aug 9 17:54:48 PDT 2024


I want to add a morph as the first submorph in a LayoutMorph that already
has submorphs.
I thought the addMorphFront: method would do that, but it doesn't.
This code seems surprising:

lm := LayoutMorph newColumn openInWorld.
lm addMorph: (LabelMorph new contents: 'one').
lm addMorph: (LabelMorph new contents: 'two').
first := lm submorphs first.

first will be set to the LabelMorph whose content is 'two', not 'one'.

Is there a way to add a morph to the beginning of a LayoutMorph?

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240809/75e87f34/attachment.htm>


More information about the Cuis-dev mailing list