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

Hilaire Fernandes hfern at free.fr
Sat Aug 10 07:34:34 PDT 2024


Use the source, Mark!

You will discover that addMorph: and addMorphFront: are identical in the 
context of LayoutMorph. Indeed, there can't be a notion of Z-ordering in 
a LayoutMorph.


LayoutMorph>>addMorph:  aMorph
	"Add a submorph, at the bottom or right, with a default LayoutSpec if 
none was provided."

	aMorph  isPlacedMorph  ifFalse:  [self  error:  'Only PlacedMorphs can be used in Layouts'  ].
	aMorph  layoutSpec.
	super  addMorphFront:  aMorph



By the way Juan, addMorph: and addMorphFront are perfect twins. Any 
reason to not let addMorph: send the message addMorphFront: to self?

Le 10/08/2024 à 13:40, Mark Volkmann via Cuis-dev a écrit :
> I see now that sending #addMorphFront: does add a morph to the 
> beginning of the submorphs array, but the parent morph does not 
> automatically redraw itself. Sending #redrawNeeded to the parent does 
> not force it to redraw using the updated submorphs array. What can I 
> do to force that?

-- 
GNU Dr. Geo
http://gnu.org/s/dr-geo/
http://gnu-drgeo.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240810/2a9dee3e/attachment-0001.htm>


More information about the Cuis-dev mailing list