[squeak-dev] Examples of PluggableMultiColumnListMorph configuration

H. Hirzel hannes.hirzel at gmail.com
Tue Oct 15 09:47:54 UTC 2019


Hi Marcel
It works fine.

Note that if you do not define
- model
- view
as block variables   | model view |
and thus have them as workspace bound variables you may execute single
statements later on the same morph and thus see the effect of the
statement dynamically applied.

More: https://wiki.squeak.org/squeak/6629

Kind regards
Hannes

On 10/15/19, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> Hi, all.
>
> Update your Trunk image and try this:
>
>
> | model view |
> model := {
> SystemNavigation default allClasses collect: #name.
> SystemNavigation default allClasses collect: #category.
> }.
>
> view := PluggableMultiColumnListMorph
> on: model
> list: #yourself
> selected: nil
> changeSelected: nil.
>
> view extent: 200 at 300.
> view listFilterSet: 'Hand'.
>
> view openInHand.
>
> "Play around with horizontal alignment."
> view listMorphs first cellPositioning: #rightCenter.
> view listMorphs second cellPositioning: #center.
> view listMorphs do: [:col | col cellPositioning: #leftCenter].
>
> "Play around with margins."
> view listMorphs do: [:col | col cellInset: 0].
> view listMorphs do: [:col | col cellInset: 3 at 0].
> view listMorphs do: [:col | col cellInset: 5].
>
> "Funny but not useful."
> view listMorphs first cellInset: 3. view listMorphs second cellInset: 0.
>
> "Fit all contents."
> view listMorphs do: [:col | col
> hResizing: #shrinkWrap;
> vResizing: #shrinkWrap]. "always set anyway"
> view
> hResizing: #shrinkWrap;
> vResizing: #shrinkWrap.
> "Enable horizontal scrolling"
> view
> hResizing: #rigid;
> hScrollBarPolicy: #whenNeeded;
> width: 100.
> "Disable horizontal scrolling"
> view hScrollBarPolicy: #never.
>
> Best,
> Marcel


More information about the Squeak-dev mailing list