On Fri, 27 Dec 2019 at 09:17, Ben Coman wrote:
> I'm trying to adapt this example from the Spec booklet...
>
> ListPresenter new
> displayBlock: [ :x | x buildWithSpec ];
> items: ('Files' asPackage classes
> collect: [:cls | ButtonPresenter new icon: cls systemIcon;
> label: cls name]);
> openWithSpec
>
> to use my own presenter rather than ButtonPresenter, but it seems to be
> only showing the first line of my presenter. How can the height of each
> list row be changed. i.e. for the able sample code, how to make the
> buttons taller?
>
I thought #heightToDisplayInList: looked promising, but overriding it to
force a particular value like this...
```
ButtonPresenter subclass: MyButtonPresenter
...etc
MyButtonPresenter >> heightToDisplayInList: aList
^200
```
then doing...
```
cls := 'Files' asPackage classes anyOne.
mbp := MyButtonPresenter new icon: cls systemIcon; label: cls name.
lp := ListPresenter new
displayBlock: [ :x | x buildWithSpec ];
items: {mbp. mbp}.
lp openWithSpec.
```
didn't change the row height.
cheers -ben