You Are Here:

Community: Wiki

This page was last modified on 26 November 2007, at 05:40.

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;
}
}

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fOnE5fdeviceE5fdebuggingE5fE2dE5fscreencastsX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZseriesE5f60Q qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qfnZuserE5ftagQSxs60X qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ