I am working on a client in Pharo for which I want to be able to color
different pieces of text in different colors (the text stream I'm receiving
has ANSI escape codes, and I'll be parsing those and coloring the text
appropriately for display). But I have not been able to figure out how to
get text color to appear.

I set up a simple UI in Spec, using a TextModel for my display. To see if
coloring worked, I sent updates to the display via:

        textToAdd := TextMorph new contents: (Character linefeed asString,
text asString).
        displayField pendingText: (textToAdd textColor: Color lightBlue).
        displayField accept.

I would expect to see the text appear in lightBlue, but it all appears
black just like before. Anyone know the solution to coloring text inside
Spec widgets?

Reply via email to