[squeak-dev] Examples of PluggableMultiColumnListMorph configuration

Marcel Taeumel marcel.taeumel at hpi.de
Tue Oct 15 11:46:04 UTC 2019


Thanks for the pointer. I added that "| ... |" just for documentation. You are right, it impedes experimentation in the workspace.

Best,
Marcel
Am 15.10.2019 11:48:01 schrieb H. Hirzel <hannes.hirzel at gmail.com>:
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 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191015/bda15d71/attachment.html>


More information about the Squeak-dev mailing list