user869097
user869097

Reputation: 1362

Change list background color in Pharo with Spec

Is this supposed to change a list background color to red in Pharo?

ListModel new 
    items: (1 to: 10);
    color: Color red;
    openWithSpec.

Because it's always white no matter what, nothing happens.

Upvotes: 2

Views: 267

Answers (2)

Sean DeNigris
Sean DeNigris

Reputation: 6390

Nicolai Hess proposed this workaround on the Pharo Dev list:

ListModel new 
    items: (1 to: 10);
    backgroundColorBlock: [ :item :index |Color red ];
    openWithSpec.

Upvotes: 1

Benjamin Van Ryseghem
Benjamin Van Ryseghem

Reputation: 136

That's actually a Morphic issue.

It needs a massive refactoring to allow this feature, so sadly it's not planned for anytime soon.

Sorry Benjamin Van Ryseghem

Upvotes: 4

Related Questions