list in AlignmentMorph

Ned Konz ned at squeakland.org
Sat Jan 17 18:26:26 UTC 2004


On Saturday 17 January 2004 1:13 am, Lulu wrote:
>         | aList r |
>         aList _ PluggableListMorph new

You shouldn't use #new there.

>                                 on: self
>                                 list: #nameList
>                                 selected: #listIndex
>                                 changeSelected: #listIndex:
>                                 menu: #listMenu:
>                                 keystroke: #listKey:from:.
>      aList hResizing:#spaceFill.
>         r _ AlignmentMorph new color: Color lightBlue;
>                                  layoutInset: 0;
>                                  wrapCentering: #center;
>                                  cellPositioning: #leftCenter;
>                                  hResizing: #spaceFill;
>                                  vResizing: #spaceFill.
>         r extent:380 at 200.                       
>         r addMorphBack: aList.
>         self addMorphBack: r.

You may not need the AlignmentMorph. If the AlignmentMorph has no other 
submorphs, you don't need it.

You can try this from a Workspace:

stuff _ #(a b c d e).
aList _ PluggableListMorph on: stuff list: #yourself selected: #size 
changeSelected: nil menu: nil keystroke: nil.
aList hResizing:#spaceFill.
r _ AlignmentMorph new color: Color lightBlue;  layoutInset: 0;  
wrapCentering: #center;  cellPositioning: #leftCenter;  hResizing: 
#spaceFill;  vResizing: #spaceFill.
r extent:380 at 200.
r addMorphBack: aList.
r openInHand.


More information about the Squeak-dev mailing list