For example, it works
m := DynamicComposableModel new.
m instantiateModels: #(listModel ListModel ).
m listModel backgroundColorBlock: [ Color blue ].
m listModel displayBlock: [ :it | it printString].
l := ( SpecLayout composed newRow: #listModel ; yourself ).
m listModel items: (1 to: 10).
m listModel backgroundColorBlock: [:item :index | Color blue].
m layout: l.
m openWithSpec .
but it does not work
m := DynamicComposableModel new.
m instantiateModels: #(listModel MultiColumnListModel ).
m listModel backgroundColorBlock: [ Color blue ].
m listModel displayBlock: [ :it | { it printString. it printString} ].
l := ( SpecLayout composed newRow: #listModel ; yourself ).
m listModel items: (1 to: 10).
m listModel backgroundColorBlock: [:item :index | Color blue].
m layout: l.
m openWithSpec .
TIA
Ing. Pablo Digonzelli
Software Solutions
IP-Solutiones SRL
Metrotec SRL
25 de Mayo 521
Email: [email protected]
[email protected]
Cel: 5493815982714
----- Mensaje original -----
De: "Pablo R. Digonzelli" <[email protected]>
Para: "Pharo Development List" <[email protected]>
Enviados: Jueves, 26 de Junio 2014 19:53:06
Asunto: Re: [Pharo-dev] spec question
Someone knows how to set backgroundColorBlock: in an MultiColumnListBox?.
TIA
Ing. Pablo Digonzelli
Software Solutions
IP-Solutiones SRL
Metrotec SRL
25 de Mayo 521
Email: [email protected]
[email protected]
Cel: 5493815982714
----- Mensaje original -----
De: "Pablo R. Digonzelli" <[email protected]>
Para: [email protected], "Pharo Development List" <[email protected]>
Enviados: Jueves, 26 de Junio 2014 19:13:57
Asunto: Re: [Pharo-dev] spec question
thanks Nicolai!
Ing. Pablo Digonzelli
Software Solutions
IP-Solutiones SRL
Metrotec SRL
25 de Mayo 521
Email: [email protected]
[email protected]
Cel: 5493815982714
----- Mensaje original -----
De: "Nicolai Hess" <[email protected]>
Para: "Pharo Development List" <[email protected]>
CC: "Any question about pharo is welcome" <[email protected]>
Enviados: Jueves, 26 de Junio 2014 18:55:26
Asunto: Re: [Pharo-dev] spec question
2014-06-26 23:13 GMT+02:00 Pablo R. Digonzelli < [email protected] > :
Hi all, two questions about Spec.
1) How can i change the font for a ListModel or TextModel?
2) I try , but nothing happend . I does not work but there is no error also
l := ListModel new.
l backgroundColorBlock: [ Color red ].
l openWithSpec .
Can I change de backcolor of ListModel ?
Sorry for my english.
TIA
Ing. Pablo Digonzelli
Software Solutions
IP-Solutiones SRL
Metrotec SRL
25 de Mayo 521
Email: [email protected]
[email protected]
Cel: 5493815982714
About the font: I don't know if this is possible.
For the background color:
This works only for the background of the list cells. If there is no entry
in your listmodel list, the list view is empty as well and there is nothing
to show.
This works:
ListModel new
items: (1 to: 10);
backgroundColorBlock: [ :item :index |Color red ];
openWithSpec.
or with more colors :)
ListModel new
items: Color registeredColorNames ;
backgroundColorBlock: [ :item :index | Color named:item];
openWithSpec.