Examples of PluggableListMorph configuration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Examples of PluggableListMorph configuration

marcel.taeumel
Hi, all.

Update your Trunk image and try this:


| model view |
model := SystemNavigation default allClasses collect: #name.

view := PluggableListMorph
on: model
list: #yourself
selected: nil
changeSelected: nil.

view extent: 200@300.
view listFilterSet: 'Hand'.

view openInHand.

"Play around with horizontal alignment."
view listMorph cellPositioning: #leftCenter.
view listMorph cellPositioning: #center.
view listMorph cellPositioning: #rightCenter.

"Play around with margins."
view listMorph cellInset: 0.
view listMorph cellInset: 3@0.
view listMorph cellInset: (10@5 corner: 10@5).
view listMorph cellInset: (0@ -1 corner: 0 @ -1).

"Fit all contents."
view listMorph
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


Reply | Threaded
Open this post in threaded view
|

Re: Examples of PluggableListMorph configuration

Christoph Thiede

Hi Marcel,


Personally, I have looked up your Examples of * configuration mails a few times so far. I'd find it quite helpful if you could store them as a class-side example method into the relevant classes :-)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Dienstag, 15. Oktober 2019 09:34:18
An: gettimothy via Squeak-dev
Betreff: [squeak-dev] Examples of PluggableListMorph configuration
 
Hi, all.

Update your Trunk image and try this:


| model view |
model := SystemNavigation default allClasses collect: #name.

view := PluggableListMorph
on: model
list: #yourself
selected: nil
changeSelected: nil.

view extent: 200@300.
view listFilterSet: 'Hand'.

view openInHand.

"Play around with horizontal alignment."
view listMorph cellPositioning: #leftCenter.
view listMorph cellPositioning: #center.
view listMorph cellPositioning: #rightCenter.

"Play around with margins."
view listMorph cellInset: 0.
view listMorph cellInset: 3@0.
view listMorph cellInset: (10@5 corner: 10@5).
view listMorph cellInset: (0@ -1 corner: 0 @ -1).

"Fit all contents."
view listMorph
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


Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: Examples of PluggableListMorph configuration

Eliot Miranda-2


On Dec 13, 2019, at 8:39 AM, Thiede, Christoph <[hidden email]> wrote:



Hi Marcel,


Personally, I have looked up your Examples of * configuration mails a few times so far. I'd find it quite helpful if you could store them as a class-side example method into the relevant classes :-)


+1


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Dienstag, 15. Oktober 2019 09:34:18
An: gettimothy via Squeak-dev
Betreff: [squeak-dev] Examples of PluggableListMorph configuration
 
Hi, all.

Update your Trunk image and try this:

<image.png>

| model view |
model := SystemNavigation default allClasses collect: #name.

view := PluggableListMorph
on: model
list: #yourself
selected: nil
changeSelected: nil.

view extent: 200@300.
view listFilterSet: 'Hand'.

view openInHand.

"Play around with horizontal alignment."
view listMorph cellPositioning: #leftCenter.
view listMorph cellPositioning: #center.
view listMorph cellPositioning: #rightCenter.

"Play around with margins."
view listMorph cellInset: 0.
view listMorph cellInset: 3@0.
view listMorph cellInset: (10@5 corner: 10@5).
view listMorph cellInset: (0@ -1 corner: 0 @ -1).

"Fit all contents."
view listMorph
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