title: How can I change text color in CEikRichTextEditor Symbian
body: <p>Is there anyway to change parts of the text I add into CEikRichTextEditor control without selecting the text first - which shows the green selection rectangle over the text - and then apply text style?</p>
  
  <p>Here is the code I use which gives an ugly and sloppy style when user see the running green selection rectangle over the text especially when I insert the text inside a loop</p>
  
  <pre><code>CDesCArray* temp = new(ELeave) CDesCArrayFlat(4);
  temp-&gt;AppendL(_L("First"));
  temp-&gt;AppendL(_L("Second"));
  temp-&gt;AppendL(_L("Third"));
  temp-&gt;AppendL(_L("Fourth"));
  TBuf&lt;100&gt;iNumbers;
  iNumbers.Copy(_L("Here is the numbers"));
  iRichText1-&gt;SetTextL(&amp;iNumbers); // iRichText1 is a pointer to CEikRichTextEditor object
  
  for(TInt i = 0; i &lt; temp-&gt;Count(); i++)
      {   
          TInt x = iRichText1-&gt;Text()-&gt;DocumentLength();
          iRichText1-&gt;RichText()-&gt;InsertL(x, (*temp)[i]);
          iRichText1-&gt;SetSelectionL(x,iRichText1-&gt;Text()-&gt;DocumentLength());
          iRichText1-&gt;BoldItalicUnderlineEventL(CEikGlobalTextEditor::EItalic);
  
          TInt line = iRichText1-&gt;Text()-&gt;DocumentLength();
          iRichText1-&gt;RichText()-&gt;InsertL(line, _L("\f\f"));
  
      }
  </code></pre>
  
  <p>Many thanks in advance.</p>