[Cuis-dev] How to constraint a layout morph
Juan Vuletich
juan at cuis.st
Mon Oct 6 06:00:23 PDT 2025
Hi Hilaire,
I need a more complete example. In a base updated Cuis I did this:
1) Create class:
LinearLayoutMorph subclass: #Totola
instanceVariableNames: 'date model description'
classVariableNames: ''
poolDictionaries: ''
category: 'Morphic-Composite Widgets'
2) Add a class method:
extent
^400 at 200
3) Add an instance method:
initialize
super initialize.
self beColumn.
date := LabelMorph contents: (Date today printFormat: #(1 2 3 $/ 1
1 1)) fontSize: 12 emphasis: 1.
description := TextParagraphMorph contents: 'model description'.
self addMorph: date;
addMorph: description;
morphExtent: self class extent
4) Evaluate:
Totola new openInWorld
Seems to work OK. Please see how important it is to give enough detail
so the problem can be reproduced and understood.
Thanks,
On 01/10/2025 11:53 AM, Hilaire Fernandes via Cuis-dev wrote:
> initialize
> super initialize.
> self beColumn.
> date := LabelMorph contents: (model date printFormat: #(1 2 3 $/ 1
> 1 1)) fontSize: 12 emphasis: 1.
> description := TextParagraphMorph contents: model description.
> self addMorph: date;
> addMorph: description;
> * morphExtent: self class extent*
--
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251006/abb87a2f/attachment.htm>
More information about the Cuis-dev
mailing list