03-26-2009 05:05 PM
I'd like to be able to color individual pieces of text in a rich text field without having to write the entire thing myself.
I see that RichTextField has a protected method call "getForegroundColors()" which returns an array of colors corresponding the regions in the RichTextField. I tried overriding the method in order to specify which colors I wanted for the given regions but it didn't make any difference.
So my question is, what is the point of getForegroundColors() if there is no way to set them? Wouldn't it always just return the default color? If there is a way to set them, how does one do it?
TIA.
04-01-2009 02:08 PM
A RichTextField allows you to set different text styles within it (bold, italic, etc..). It does not currently support different colours within text. You can see an example of this here:
How To - Format text in a RichTextField
Article Number: DB-00124