You Are Here:

Community: Wiki

This page was last modified 14:43, 3 May 2009.

How to use custom background color for edwin in 3rd

From Forum Nokia Wiki


I used CEikEdwin::SetBackgroundColorL() to draw a custom Background color in 2nd and it works fine, but not draw in 3rd. For 3rd edition, you should use CParaFormat and TextView.

CustomEdwin.cpp

void CMyEditorContainer::ConstructL(const TRect& aRect)
{
   ...
   iEdwin = new (ELeave) CEikGlobalTextEditor;
   iEdwin->SetContainerWindowL(*this);
   iEdwin->SetBackgroundColorL(KMyCustomColor);
   iEdwin->TextView()->SetBackgroundColor(KMyCustomColor);
   ...
}
 
Everytime after you change the text:
  CParaFormat* pf = new (ELeave) CParaFormat();
  CleanupStack::PushL(pf);
  pf->iFillColor = KMyCustomColor;
  TParaFormatMask mask;
  mask.SetAttrib(EAttFillColor);
  iEdwin->ApplyParaFormatL(pf, mask);
  CleanupStack::PopAndDestroy();

CustomEdwin.h

class CMyEditorContainer: public CCoeControl, MCoeControlObserver
{
   ...
    private:
        CEikGlobalTextEditor*   iEdwin;
   ...
}

Links

How to use custom background color for edwin in 2nd


--

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fHowE5ftoE5fgetE5ftheE5fCurrentE5fOrientationX 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