Login  Register

Re: [etoys-dev] How can I color one character of text?

Posted by Bert Freudenberg on Mar 15, 2013; 12:25am
URL: https://forum.world.st/How-can-I-color-one-character-of-text-tp4676867p4676869.html

On 2013-03-15, at 01:05, Steve Thomas <[hidden email]> wrote:

I am working on a word recognition/typing program in Etoys for Haiti. (and anyone else who needs it).

I need to be able to change the color of the character at cursor.

How can I do this?  (squeak code is fine)




setColorAtCursor: color 
| m |
m := self costume renderedMorph.
m text
addAttribute: (TextColor color: color)
from: m cursor
to: m cursor.
m changed

- Bert -



_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland