[Cuis-dev] How do I get a form instance of a LayoutMorph instance? aMorph imageForm equivalent?

H. Hirzel hannes.hirzel at gmail.com
Fri Feb 28 01:18:28 PST 2025


On 28/02/2025 10:33 am, Luciano Notarfrancesco via Cuis-dev wrote:

> Maybe Morph>>imageForm:depth: ?
>
Yes, thank you Luciano; this is the solution. I was looking in the 
'accessing' category, not the 'drawing' category.

Interesting to note that I have to give the layout morph any initial 
extent so that it grows to the necessary morphExtent as needed by the 
submorphs added. If I do not do that I just get a morph of extent 50 at 40.

That is a strange default behavior for a LayoutMorph object.

--Hannes


Feature require: 'Graphics-Files-Additional'.

"(ImageReadWriter formFromFileNamed: 'F05.jpg') class  Form ."

row := LayoutMorph newRow.
row addMorphUseAll: (ImageMorph newWith: (ImageReadWriter 
formFromFileNamed: 'F05e.jpg')).
row addMorphUseAll: (ImageMorph newWith: (ImageReadWriter 
formFromFileNamed: 'F06e.jpg')).
row addMorphUseAll: (ImageMorph newWith: (ImageReadWriter 
formFromFileNamed: 'F07b-e.jpg')).
row addMorphUseAll: (ImageMorph newWith: (ImageReadWriter 
formFromFileNamed: 'F08e.jpg')).
"row morphExtent 50 at 40."
row morphExtent: 1 at 1.
JPEGReadWriter2 putForm: (row imageForm: row morphExtent depth: 32) 
quality: 100 progressiveJPEG: true onFileNamed: 'row1.jpg'.
row morphExtent
  3875 at 731 .



More information about the Cuis-dev mailing list