# Text color

**URL:** <https://www.ruby-forum.com/t/text-color/153228>\
**Category:** wxRuby\
**Created:** [November 13, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/text-color/153228 "2008-11-13T17:43:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyrill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3bc359/32.png) [@cyrill](https://www.ruby-forum.com/u/cyrill)\
**Post date:** [November 13, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/text-color/153228/1 "2008-11-13T17:43:13Z")

</div>

Hello.  
I can’t change text color (on vista). How can I do this?  
[http://pastie.org/313982](http://pastie.org/313982)  
I try mingw too…

---

<div class="post-metadata">

**Author:** ![cyrill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3bc359/32.png) [@cyrill](https://www.ruby-forum.com/u/cyrill)\
**Post date:** [November 13, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/text-color/153228/2 "2008-11-13T17:51:35Z")

</div>

Cyrill Jakovlev wrote:

> I can’t change text color (on vista). How can I do this?  
> [http://pastie.org/313982](http://pastie.org/313982)

If you want to have coloured, styled text using TextAttr, you must  
create your TextCtrl with the styles  
Wx::TE\_RICH|Wx::TE\_RICH2|Wx::TE\_MULTILINE

A normal multiline TextCtrl is just plain text, in system standard  
colours.

hth  
a

---

<div class="post-metadata">

**Author:** ![cyrill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/3bc359/32.png) [@cyrill](https://www.ruby-forum.com/u/cyrill)\
**Post date:** [November 14, 2008, 1:33am UTC](https://www.ruby-forum.com/t/text-color/153228/3 "2008-11-14T01:33:10Z")

</div>

Now text is coloured, tnx)
