How can I color one character of text?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I color one character of text?

Steve Thomas
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)

Thanks,
Stephen

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

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

Bert Freudenberg
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
Reply | Threaded
Open this post in threaded view
|

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

Steve Thomas

         
Steve Thomas has shared a video with you on YouTube
Thank you Bert!!!
         
Word Balloons in Etoys
Teachers and Students can enter a list of words to practice typing, word and letter recognition.
©2013 YouTube, LLC 901 Cherry Ave, San Bruno, CA 94066

On Thu, Mar 14, 2013 at 8:25 PM, Bert Freudenberg <[hidden email]> wrote:
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
Reply | Threaded
Open this post in threaded view
|

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

Steve Thomas
Version 2 - Picture Words

Steve Thomas has shared a video with you on YouTube
Version 2 - Picture Words
Picture Words
Type in the Word represented by the Picture
©2013 YouTube, LLC 901 Cherry Ave, San Bruno, CA 94066

On Thu, Mar 14, 2013 at 8:58 PM, Steve Thomas <[hidden email]> wrote:

         
Steve Thomas has shared a video with you on YouTube
Thank you Bert!!!
         
Word Balloons in Etoys
Teachers and Students can enter a list of words to practice typing, word and letter recognition.
©2013 YouTube, LLC 901 Cherry Ave, San Bruno, CA 94066

On Thu, Mar 14, 2013 at 8:25 PM, Bert Freudenberg <[hidden email]> wrote:
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