Categories: Customization | S60 | Symbian C++ | UI | Code Examples | How To
This page was last modified 05:40, 26 November 2007.
How to apply highlighting in richtexteditor
From Forum Nokia Wiki
Richtexteditor offers many functions that can set the text bold, italics, underline, etc... One such good function is highlighting the text. It's very helpful if we want to show a link (hyperlink) like effect. Additional coding is required with relevent data structures to implement moving from one word to the other or moving from one highlighted word to some other one.
The following function applies/removes highlighting in a CEikRichTextEditor.
void CMyRichTextEditor::SetHighlightOn(TBool aOn) { SetSmallFontOn(); iCharFormatMask.SetAttrib(EAttFontHighlightColor); iCharFormatMask.SetAttrib(EAttFontHighlightStyle); if (aOn) { iCharFormat.iFontPresentation.iHighlightColor=TLogicalRgb( TRgb(0,255,255) ); iCharFormat.iFontPresentation.iHighlightStyle=TFontPresentation ::EFontHighlightNormal; } else { iCharFormat.iFontPresentation.iHighlightColor=KRgbWhite; iCharFormat.iFontPresentation.iHighlightStyle=TFontPresentation ::EFontHighlightNone; } }
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| when to use short, byte, and int | 3hrguy | Mobile Java General | 9 | 2004-05-28 11:40 |
| how to apply a certain 3rd edition skin only to a certain application? | GeKI | General Symbian C++ | 2 | 2007-05-18 15:36 |
| Coloured text console | odinelson | Symbian User Interface | 4 | 2007-08-09 22:06 |
| TTime::Set() with TBufC | arachidyl | General Symbian C++ | 14 | 2006-03-08 07:19 |
| Carbide.c++ Express available for download | mitts | General Symbian C++ | 2 | 2006-02-21 15:11 |
